New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@balena/abstract-sql-compiler

Package Overview
Dependencies
Maintainers
3
Versions
475
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/abstract-sql-compiler - npm Package Compare versions

Comparing version 7.12.2 to 7.13.0-model-based-optimizations-37f50ae20f73dc307eea1aa0c87a138d08a50f00

test/abstract-sql/models-based-optimizations.ts

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## 7.13.0 - 2021-05-03
* Add support for non-null ReferencedField optimization using model info [Pagan Gazzard]
## 7.12.2 - 2021-03-22

@@ -9,0 +13,0 @@

18

out/AbstractSQLCompiler.d.ts

@@ -231,12 +231,12 @@ export declare const enum Engines {

export declare const isResourceNode: (n: AbstractSqlType) => n is ResourceNode;
export declare function compileRule(abstractSQL: UpsertQueryNode, engine: Engines, noBinds: true): [string, string];
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds: true): string;
export declare function compileRule(abstractSQL: UpsertQueryNode, engine: Engines, noBinds?: false): [SqlResult, SqlResult];
export declare function compileRule(abstractSQL: SelectQueryNode | UnionQueryNode | InsertQueryNode | UpdateQueryNode | DeleteQueryNode, engine: Engines, noBinds?: false): SqlResult;
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: false): SqlResult | [SqlResult, SqlResult];
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: boolean): SqlResult | [SqlResult, SqlResult] | string;
export declare function compileRule(abstractSQL: UpsertQueryNode, engine: Engines, noBinds: true, abstractSqlModel?: AbstractSqlModel): [string, string];
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds: true, abstractSqlModel?: AbstractSqlModel): string;
export declare function compileRule(abstractSQL: UpsertQueryNode, engine: Engines, noBinds?: false, abstractSqlModel?: AbstractSqlModel): [SqlResult, SqlResult];
export declare function compileRule(abstractSQL: SelectQueryNode | UnionQueryNode | InsertQueryNode | UpdateQueryNode | DeleteQueryNode, engine: Engines, noBinds?: false, abstractSqlModel?: AbstractSqlModel): SqlResult;
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: false, abstractSqlModel?: AbstractSqlModel): SqlResult | [SqlResult, SqlResult];
export declare function compileRule(abstractSQL: AbstractSqlQuery, engine: Engines, noBinds?: boolean, abstractSqlModel?: AbstractSqlModel): SqlResult | [SqlResult, SqlResult] | string;
export declare const postgres: {
optimizeSchema: (abstractSqlModel: AbstractSqlModel) => AbstractSqlModel;
compileSchema: (abstractSqlModel: AbstractSqlModel) => SqlModel;
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult];
compileRule: (abstractSQL: AbstractSqlQuery, abstractSqlModel?: AbstractSqlModel | undefined) => SqlResult | [SqlResult, SqlResult];
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>;

@@ -250,3 +250,3 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields;

compileSchema: (abstractSqlModel: AbstractSqlModel) => SqlModel;
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult];
compileRule: (abstractSQL: AbstractSqlQuery, abstractSqlModel?: AbstractSqlModel | undefined) => SqlResult | [SqlResult, SqlResult];
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>;

@@ -260,3 +260,3 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields;

compileSchema: (abstractSqlModel: AbstractSqlModel) => SqlModel;
compileRule: (abstractSQL: AbstractSqlQuery) => SqlResult | [SqlResult, SqlResult];
compileRule: (abstractSQL: AbstractSqlQuery, abstractSqlModel?: AbstractSqlModel | undefined) => SqlResult | [SqlResult, SqlResult];
dataTypeValidate: (value: any, field: Pick<AbstractSqlField, 'dataType' | 'required'>) => Promise<any>;

@@ -263,0 +263,0 @@ getReferencedFields: (ruleBody: AbstractSqlQuery) => ReferencedFields;

@@ -85,4 +85,4 @@ "use strict";

};
function compileRule(abstractSQL, engine, noBinds = false) {
abstractSQL = AbstractSQLOptimiser_1.AbstractSQLOptimiser(abstractSQL, noBinds);
function compileRule(abstractSQL, engine, noBinds = false, abstractSqlModel) {
abstractSQL = AbstractSQLOptimiser_1.AbstractSQLOptimiser(abstractSQL, noBinds, abstractSqlModel);
return AbstractSQLRules2SQL_1.AbstractSQLRules2SQL(abstractSQL, engine, noBinds);

@@ -160,3 +160,3 @@ }

CREATE ${orReplaceStr}VIEW "${table.name}" AS (
${compileRule(definitionAbstractSql, engine, true).replace(/^/gm, ' ')}
${compileRule(definitionAbstractSql, engine, true, abstractSqlModel).replace(/^/gm, ' ')}
);`,

@@ -226,3 +226,3 @@ ],

const constraintName = check.name ? `CONSTRAINT "${check.name}" ` : '';
const sql = compileRule(check.abstractSql, engine, true);
const sql = compileRule(check.abstractSql, engine, true, abstractSqlModel);
createSqlElements.push(`\

@@ -324,3 +324,3 @@ ${comment}${constraintName}CHECK (${sql})`);

}
const { query: ruleSQL, bindings: ruleBindings } = compileRule(ruleBody, engine);
const { query: ruleSQL, bindings: ruleBindings } = compileRule(ruleBody, engine, undefined, abstractSqlModel);
let referencedFields;

@@ -361,3 +361,3 @@ try {

compileSchema: (abstractSqlModel) => compileSchema(abstractSqlModel, engine, ifNotExists),
compileRule: (abstractSQL) => compileRule(abstractSQL, engine, false),
compileRule: (abstractSQL, abstractSqlModel) => compileRule(abstractSQL, engine, false, abstractSqlModel),
dataTypeValidate,

@@ -364,0 +364,0 @@ getReferencedFields: referenced_fields_1.getReferencedFields,

@@ -1,2 +0,2 @@

import { AbstractSqlQuery } from './AbstractSQLCompiler';
export declare const AbstractSQLOptimiser: (abstractSQL: AbstractSqlQuery, $noBinds?: boolean) => AbstractSqlQuery;
import { AbstractSqlModel, AbstractSqlQuery } from './AbstractSQLCompiler';
export declare const AbstractSQLOptimiser: (abstractSQL: AbstractSqlQuery, $noBinds?: boolean, $abstractSqlModel?: AbstractSqlModel | undefined) => AbstractSqlQuery;

@@ -6,3 +6,3 @@ "use strict";

const AbstractSQLRules2SQL = require("./AbstractSQLRules2SQL");
const { isAbstractSqlQuery, getAbstractSqlQuery, checkArgs, checkMinArgs, isNotNullable, } = AbstractSQLRules2SQL;
const { isAbstractSqlQuery, getAbstractSqlQuery, checkArgs, checkMinArgs, } = AbstractSQLRules2SQL;
const escapeForLike = (str) => [

@@ -20,3 +20,5 @@ 'Replace',

let helped = false;
let aliases = {};
let noBinds = false;
let abstractSqlModel;
const Helper = (fn) => {

@@ -48,2 +50,18 @@ return (...args) => {

};
const isNotNullable = (node) => {
var _a;
switch (node[0]) {
case 'ReferencedField':
if (abstractSqlModel != null) {
const [, aliasName, fieldName] = node;
const tableName = (_a = aliases[aliasName]) !== null && _a !== void 0 ? _a : aliasName;
const table = abstractSqlModel.tables[tableName];
const field = table === null || table === void 0 ? void 0 : table.fields.find((f) => f.fieldName === fieldName);
if ((field === null || field === void 0 ? void 0 : field.required) === true) {
return true;
}
}
}
return AbstractSQLRules2SQL.isNotNullable(node);
};
const rewriteMatch = (name, matchers, rewriteFn) => (args) => {

@@ -379,2 +397,6 @@ checkArgs(name, args, matchers.length);

checkArgs('From', args, 1);
const maybeAlias = args[0];
if (maybeAlias[0] === 'Alias' && maybeAlias[1][0] === 'Table') {
aliases[maybeAlias[2]] = maybeAlias[1][1];
}
return ['From', MaybeAlias(args[0], FromMatch)];

@@ -1119,6 +1141,8 @@ },

};
const AbstractSQLOptimiser = (abstractSQL, $noBinds = false) => {
const AbstractSQLOptimiser = (abstractSQL, $noBinds = false, $abstractSqlModel) => {
noBinds = $noBinds;
abstractSqlModel = $abstractSqlModel;
do {
helped = false;
aliases = {};
const [type, ...rest] = abstractSQL;

@@ -1125,0 +1149,0 @@ switch (type) {

@@ -48,3 +48,3 @@ "use strict";

}
ruleBodyNode[1] = ruleBody = AbstractSQLOptimiser_1.AbstractSQLOptimiser(ruleBody, true);
ruleBodyNode[1] = ruleBody = AbstractSQLOptimiser_1.AbstractSQLOptimiser(ruleBody, true, abstractSqlModel);
const count = countFroms(ruleBody);

@@ -51,0 +51,0 @@ if (count === 1 &&

{
"name": "@balena/abstract-sql-compiler",
"version": "7.12.2",
"version": "7.13.0-model-based-optimizations-37f50ae20f73dc307eea1aa0c87a138d08a50f00",
"description": "A translator for abstract sql into sql.",

@@ -5,0 +5,0 @@ "main": "out/AbstractSQLCompiler.js",

@@ -458,2 +458,3 @@ export const enum Engines {

noBinds: true,
abstractSqlModel?: AbstractSqlModel,
): [string, string];

@@ -464,2 +465,3 @@ export function compileRule(

noBinds: true,
abstractSqlModel?: AbstractSqlModel,
): string;

@@ -470,2 +472,3 @@ export function compileRule(

noBinds?: false,
abstractSqlModel?: AbstractSqlModel,
): [SqlResult, SqlResult];

@@ -481,2 +484,3 @@ export function compileRule(

noBinds?: false,
abstractSqlModel?: AbstractSqlModel,
): SqlResult;

@@ -487,2 +491,3 @@ export function compileRule(

noBinds?: false,
abstractSqlModel?: AbstractSqlModel,
): SqlResult | [SqlResult, SqlResult];

@@ -493,2 +498,3 @@ export function compileRule(

noBinds?: boolean,
abstractSqlModel?: AbstractSqlModel,
): SqlResult | [SqlResult, SqlResult] | string;

@@ -499,4 +505,5 @@ export function compileRule(

noBinds = false,
abstractSqlModel?: AbstractSqlModel,
): SqlResult | [SqlResult, SqlResult] | string | [string, string] {
abstractSQL = AbstractSQLOptimiser(abstractSQL, noBinds);
abstractSQL = AbstractSQLOptimiser(abstractSQL, noBinds, abstractSqlModel);
return AbstractSQLRules2SQL(abstractSQL, engine, noBinds);

@@ -596,6 +603,8 @@ }

CREATE ${orReplaceStr}VIEW "${table.name}" AS (
${compileRule(definitionAbstractSql as AbstractSqlQuery, engine, true).replace(
/^/gm,
' ',
)}
${compileRule(
definitionAbstractSql as AbstractSqlQuery,
engine,
true,
abstractSqlModel,
).replace(/^/gm, ' ')}
);`,

@@ -682,2 +691,3 @@ ],

true,
abstractSqlModel,
);

@@ -808,2 +818,4 @@ createSqlElements.push(`\

engine,
undefined,
abstractSqlModel,
) as SqlResult;

@@ -848,4 +860,6 @@ let referencedFields: ReferencedFields | undefined;

compileSchema(abstractSqlModel, engine, ifNotExists),
compileRule: (abstractSQL: AbstractSqlQuery) =>
compileRule(abstractSQL, engine, false),
compileRule: (
abstractSQL: AbstractSqlQuery,
abstractSqlModel?: AbstractSqlModel,
) => compileRule(abstractSQL, engine, false, abstractSqlModel),
dataTypeValidate,

@@ -852,0 +866,0 @@ getReferencedFields,

@@ -5,6 +5,10 @@ import * as _ from 'lodash';

import {
AbstractSqlModel,
AbstractSqlQuery,
AbstractSqlType,
AliasNode,
DurationNode,
ReferencedFieldNode,
ReplaceNode,
TableNode,
} from './AbstractSQLCompiler';

@@ -18,3 +22,2 @@ import * as AbstractSQLRules2SQL from './AbstractSQLRules2SQL';

checkMinArgs,
isNotNullable,
} = AbstractSQLRules2SQL;

@@ -41,3 +44,5 @@

let helped = false;
let aliases: { [alias: string]: string } = {};
let noBinds = false;
let abstractSqlModel: AbstractSqlModel | undefined;
const Helper = <F extends (...args: any[]) => any>(fn: F) => {

@@ -71,2 +76,18 @@ return (...args: Parameters<F>): ReturnType<F> => {

const isNotNullable = (node: AbstractSqlQuery): boolean => {
switch (node[0]) {
case 'ReferencedField':
if (abstractSqlModel != null) {
const [, aliasName, fieldName] = node as ReferencedFieldNode;
const tableName = aliases[aliasName] ?? aliasName;
const table = abstractSqlModel.tables[tableName];
const field = table?.fields.find((f) => f.fieldName === fieldName);
if (field?.required === true) {
return true;
}
}
}
return AbstractSQLRules2SQL.isNotNullable(node);
};
const rewriteMatch = (

@@ -462,2 +483,6 @@ name: string,

checkArgs('From', args, 1);
const maybeAlias = args[0] as AliasNode<TableNode>;
if (maybeAlias[0] === 'Alias' && maybeAlias[1][0] === 'Table') {
aliases[maybeAlias[2]] = maybeAlias[1][1];
}
return ['From', MaybeAlias(args[0] as AbstractSqlQuery, FromMatch)];

@@ -1319,6 +1344,9 @@ },

$noBinds = false,
$abstractSqlModel?: AbstractSqlModel,
): AbstractSqlQuery => {
noBinds = $noBinds;
abstractSqlModel = $abstractSqlModel;
do {
helped = false;
aliases = {};
const [type, ...rest] = abstractSQL;

@@ -1325,0 +1353,0 @@ switch (type) {

@@ -63,3 +63,7 @@ export const enum Engines {

// Optimize the rule body, this also normalizes it making the check constraint check easier
ruleBodyNode[1] = ruleBody = AbstractSQLOptimiser(ruleBody, true);
ruleBodyNode[1] = ruleBody = AbstractSQLOptimiser(
ruleBody,
true,
abstractSqlModel,
);

@@ -66,0 +70,0 @@ const count = countFroms(ruleBody);

@@ -79,3 +79,3 @@ import * as AbstractSQLCompiler from '../..';

CONSTRAINT "test$hkEwz3pzAqalNu6crijhhdWJ0ffUvqRGK8rMkQbViPg=" CHECK (0 < "id"
AND "id" IS NOT NULL)
AND \"id\" IS NOT NULL)
);`,

@@ -85,2 +85,75 @@ ]);

it('should optimize null checks for a required field', () => {
expect(
generateSchema({
synonyms: {},
relationships: {},
tables: {
test: {
name: 'test',
resourceName: 'test',
idField: 'id',
fields: [
{
fieldName: 'id',
dataType: 'Integer',
required: true,
index: 'PRIMARY KEY',
},
],
indexes: [],
primitive: false,
},
},
rules: [
[
'Rule',
[
'Body',
[
'Not',
[
'Exists',
[
'SelectQuery',
['Select', []],
['From', ['test', 'test.0']],
[
'Where',
[
'Not',
[
'And',
[
'LessThan',
['Integer', 0],
['ReferencedField', 'test.0', 'id'],
],
['Exists', ['ReferencedField', 'test.0', 'id']],
],
],
],
],
],
],
] as AbstractSQLCompiler.AbstractSqlQuery,
[
'StructuredEnglish',
'It is necessary that each test has an id that is greater than 0.',
],
],
],
}),
)
.to.have.property('createSchema')
.that.deep.equals([
`\
CREATE TABLE IF NOT EXISTS "test" (
"id" INTEGER NOT NULL PRIMARY KEY
, -- It is necessary that each test has an id that is greater than 0.
CONSTRAINT "test$TIITyGYLwuTGGJjwAk8awbiE/hnw6y8rue+hQ8Pp7as=" CHECK (0 < "id")
);`,
]);
});
it('should correctly shorten a converted check rule with a long name', () => {

@@ -100,2 +173,3 @@ expect(

dataType: 'Integer',
required: true,
index: 'PRIMARY KEY',

@@ -169,6 +243,5 @@ },

CREATE TABLE IF NOT EXISTS "test_table_with_very_very_long_name" (
"id" INTEGER NULL PRIMARY KEY
"id" INTEGER NOT NULL PRIMARY KEY
, -- It is necessary that each test_table_with_very_very_long_name has an id that is greater than 0.
CONSTRAINT "test_table_with_very_very_long$9z+XEkP4EI1mhDQ8SiLulo2NLmenGY1C" CHECK (0 < "id"
AND "id" IS NOT NULL)
CONSTRAINT "test_table_with_very_very_long$/rDs8gDAB2Zoc7woBPozVMLKpx9jNTNa" CHECK (0 < "id")
);`,

@@ -175,0 +248,0 @@ ]);

@@ -29,2 +29,4 @@ const typeVocab = require('fs').readFileSync(

Concept Type: Short Text (Type)
Term: nickname
Concept Type: Short Text (Type)
Term: years of experience

@@ -40,2 +42,4 @@ Concept Type: Integer (Type)

Necessity: each pilot has exactly one name
Fact Type: pilot has nickname
Necessity: each pilot has at most one nickname
Fact Type: pilot has years of experience

@@ -46,2 +50,4 @@ Necessity: each pilot has exactly one years of experience

Definition: "planeA" or "planeB" or "planeC"
Fact Type: plane has nickname
Necessity: each plane has at most one nickname
Fact Type: pilot can fly plane

@@ -87,2 +93,3 @@ Synonymous Form: plane can be flown by pilot

, "name" VARCHAR(255) NOT NULL CHECK ("name" IN ('planeA', 'planeB', 'planeC'))
, "nickname" VARCHAR(255) NULL
);`,

@@ -112,2 +119,3 @@ modifiedAtTrigger('plane'),

, "name" VARCHAR(255) NOT NULL
, "nickname" VARCHAR(255) NULL
, "years of experience" INTEGER NOT NULL

@@ -223,2 +231,8 @@ , "is experienced" INTEGER DEFAULT 0 NOT NULL

`\
SELECT 1 AS "result";`,
);
test.rule(
'It is necessary that each plane that at least 3 pilots can fly, has a nickname',
`\
SELECT NOT EXISTS (

@@ -232,3 +246,3 @@ SELECT 1

) >= 3
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -238,3 +252,3 @@ );

test.rule(
'It is necessary that each plane that at least 3 pilots that are experienced can fly, has a name',
'It is necessary that each plane that at least 3 pilots that are experienced can fly, has a nickname',
`\

@@ -252,3 +266,3 @@ SELECT NOT EXISTS (

) >= 3
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -270,10 +284,10 @@ );

) >= 3
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`;
test.rule(
'It is necessary that each plane that at least 3 pilots that are not experienced can fly, has a name',
'It is necessary that each plane that at least 3 pilots that are not experienced can fly, has a nickname',
sql,
);
test.rule(
"It is necessary that each plane that at least 3 pilots that aren't experienced can fly, has a name",
"It is necessary that each plane that at least 3 pilots that aren't experienced can fly, has a nickname",
sql,

@@ -284,3 +298,3 @@ );

test.rule(
'It is necessary that each plane that at least 3 pilot that is experienced, can fly, has a name.',
'It is necessary that each plane that at least 3 pilot that is experienced, can fly, has a nickname.',
`\

@@ -298,3 +312,3 @@ SELECT NOT EXISTS (

) >= 3
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -304,3 +318,3 @@ );

test.rule(
'It is necessary that each plane that at least 3 pilots that a name is of can fly, has a name',
'It is necessary that each plane that at least 3 pilots that a name is of can fly, has a nickname',
`\

@@ -314,7 +328,6 @@ SELECT NOT EXISTS (

"pilot-can fly-plane" AS "pilot.1-can fly-plane.0"
WHERE "pilot.1"."name" IS NOT NULL
AND "pilot.1-can fly-plane.0"."pilot" = "pilot.1"."id"
WHERE "pilot.1-can fly-plane.0"."pilot" = "pilot.1"."id"
AND "pilot.1-can fly-plane.0"."can fly-plane" = "plane.0"."id"
) >= 3
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -331,3 +344,2 @@ );

0 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -365,4 +377,3 @@ ) AS "result";`,

) >= 2
OR 5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL)
OR 5 < "pilot.0"."years of experience")
)

@@ -386,3 +397,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -411,3 +421,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -483,3 +492,3 @@ ) AS "result";`,

test.rule(
'It is necessary that each plane that at least 3 pilots can fly or exactly one pilot can fly, has a name',
'It is necessary that each plane that at least 3 pilots can fly or exactly one pilot can fly, has a nickname',
`\

@@ -499,3 +508,3 @@ SELECT NOT EXISTS (

) = 1)
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -519,3 +528,2 @@ );

AND 5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -539,3 +547,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -611,3 +618,3 @@ ) AS "result";`,

test.rule(
'It is necessary that each plane that at least 3 pilots can fly and exactly one pilot can fly, has a name',
'It is necessary that each plane that at least 3 pilots can fly and exactly one pilot can fly, has a nickname',
`\

@@ -627,3 +634,3 @@ SELECT NOT EXISTS (

) = 1
AND "plane.0"."name" IS NULL
AND "plane.0"."nickname" IS NULL
) AS "result";`,

@@ -652,3 +659,2 @@ );

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -677,3 +683,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -705,3 +710,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -730,3 +734,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -756,7 +759,5 @@ ) AS "result";`,

OR 10 < LENGTH("pilot.0"."name")
AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL)
AND LENGTH("pilot.0"."name") IS NOT NULL)
AND NOT (
5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -784,7 +785,5 @@ ) AS "result";`,

AND 10 < LENGTH("pilot.0"."name")
AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL)
AND LENGTH("pilot.0"."name") IS NOT NULL)
AND NOT (
5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -812,7 +811,5 @@ ) AS "result";`,

AND 10 < LENGTH("pilot.0"."name")
AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL)
AND LENGTH("pilot.0"."name") IS NOT NULL)
AND NOT (
5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -840,7 +837,5 @@ ) AS "result";`,

AND 10 < LENGTH("pilot.0"."name")
AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL)
AND LENGTH("pilot.0"."name") IS NOT NULL)
AND NOT (
5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -874,3 +869,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -906,3 +900,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -927,4 +920,3 @@ ) AS "result";`,

OR 10 < LENGTH("pilot.0"."name")
AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL)
AND LENGTH("pilot.0"."name") IS NOT NULL)
AND (

@@ -937,3 +929,2 @@ SELECT COUNT(*)

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -957,3 +948,2 @@ ) AS "result";`,

AND LENGTH("pilot.0"."name") IS NOT NULL
AND "pilot.0"."name" IS NOT NULL
OR (

@@ -966,3 +956,2 @@ SELECT COUNT(*)

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -998,3 +987,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -1030,3 +1018,2 @@ ) AS "result";`,

5 < "pilot.0"."years of experience"
AND "pilot.0"."years of experience" IS NOT NULL
)

@@ -1033,0 +1020,0 @@ ) AS "result";`,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc