sql-bricks-postgres icon indicating copy to clipboard operation
sql-bricks-postgres copied to clipboard

v0.6.0 Cloned statement doesn't have postgres methods

Open FanFataL opened this issue 1 year ago • 3 comments

Hi,

After upgrading from 0.5.0 into 0.6.0 cloned statements stops working.

Steps to reproduce:

const query = sql.select().from('user');
query.limit(10); // <--- this is working
const query2 = query.clone();
query2.limit(10); // <--- this not working in 0.6.0 (limit is not a function)

Probably upgrading sqlBricks to v3 makes this issue.

FanFataL avatar Nov 07 '23 19:11 FanFataL

Does this type of thing work with sqlbricks themselves? Maybe the issue should be opened there?

Suor avatar Nov 08 '23 04:11 Suor

limit (and other functions like offset) are added by this library ;-) And only those added functions not working after cloning. The standard sql-bricks functions works perfectly after cloning.

FanFataL avatar Nov 08 '23 06:11 FanFataL

Heh, it's been quite a while since I was actively developing this.

Suor avatar Nov 08 '23 08:11 Suor