Compare commits

..

No commits in common. "67b10d949ad2285ef2f359080050eac0c1c1b670" and "6b121937f7e21176596e48e4c2c57f0ce9c46ff6" have entirely different histories.

4 changed files with 2 additions and 21 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "dblang", "name": "dblang",
"version": "0.6.2", "version": "1.0.0",
"description": "", "description": "",
"main": "dist/db.js", "main": "dist/db.js",
"types": "dist/db.d.ts", "types": "dist/db.d.ts",

View file

@ -238,7 +238,6 @@ BooleanModifier:
- `le(v1, v2, ...)` - `le(v1, v2, ...)`
- `not(v1)` - `not(v1)`
- `like(v1, v2)` - `like(v1, v2)`
- `exists(s)`
NumberModifier: NumberModifier:
- `plus(v1, v2, ...)` - `plus(v1, v2, ...)`
@ -249,7 +248,7 @@ NumberModifier:
StringModifier: StringModifier:
- `concat(v1, v2, ...)` - `concat(v1, v2, ...)`
(v\* = string, number, boolean, null, Modifier, Aggregation, select Query, Attribute; s = selectQuery) (v\* = string, number, boolean, null, Modifier, Aggregation, select Query, Attribute)
#### Joins #### Joins

View file

@ -751,22 +751,6 @@ export class Handler {
} }
return builder; return builder;
}, },
exists: (handler: Handler, a: allModifierInput[]):QueryBuilder =>{
let e = a[0];
if (e instanceof Attribute || e instanceof AttributeAlias) return new QueryBuilder([{ data: "exists (" + e.getString(handler) + ")" }])
if (e instanceof Modifier || e instanceof selectQuery || e instanceof Aggregation) {
const builder = new QueryBuilder();
builder.addCode("exists (");
builder.append(e.serialize(handler));
builder.addCode(")");
return builder;
}
return new QueryBuilder([
{ data: "exists (" },
{ inject: true, data: e },
{ data: ")" }
]);
},
concat: (handler: Handler, a: allModifierInput[]): QueryBuilder => { concat: (handler: Handler, a: allModifierInput[]): QueryBuilder => {
const builder = new QueryBuilder(); const builder = new QueryBuilder();
builder.addCode("CONCAT("); builder.addCode("CONCAT(");

View file

@ -20,8 +20,6 @@ export const not = (arg: allModifierInput) => new BooleanModifier("not", [arg]);
export const like = (a: allModifierInput, b: allModifierInput) => new BooleanModifier("like", [a, b]); export const like = (a: allModifierInput, b: allModifierInput) => new BooleanModifier("like", [a, b]);
export const regexp = (a: allModifierInput, b: allModifierInput) => new BooleanModifier("regexp", [a, b]); export const regexp = (a: allModifierInput, b: allModifierInput) => new BooleanModifier("regexp", [a, b]);
export const exists = (q: selectQuery) => new BooleanModifier("exists", [q]);
export const concat = (...args: allModifierInput[]) => new StringModifier("concat", args); export const concat = (...args: allModifierInput[]) => new StringModifier("concat", args);
//aggregations //aggregations