fiexed limit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
jusax23 2023-02-15 16:22:40 +01:00
parent b5e68e6640
commit 2b6e4872d5
2 changed files with 16 additions and 7 deletions

View file

@ -255,9 +255,16 @@ export class Handler {
builder.append(q.havingD.serialize(handler));
}
}
if (q.havingD) {
if (q.limitD != null) {
if (q.limitOffsetD == null) {
builder.addCode(" limit ");
builder.addInjection(q.limitD);
} else {
builder.addCode(" limit ");
builder.addInjection(q.limitOffsetD);
builder.addCode(", ");
builder.addInjection(q.limitD);
}
}
/*builder.setHandler((json)=>{

View file

@ -83,8 +83,10 @@ export class selectQuery {
return this;
}
limitD: number | null = null;
limit(i: number) {
limitOffsetD: number | null = null;
limit(i: number, offset: number = 0) {
this.limitD = i;
this.limitOffsetD = offset;
return this;
}