Updates
This commit is contained in:
parent
761348de08
commit
881128fcea
@ -27,6 +27,9 @@ function sqlGenerator({ tableName, genObject, dbFullName, count }) {
|
|||||||
if (queryObj.nullValue) {
|
if (queryObj.nullValue) {
|
||||||
str = `${finalFieldName} IS NULL`;
|
str = `${finalFieldName} IS NULL`;
|
||||||
}
|
}
|
||||||
|
else if (queryObj.notNullValue) {
|
||||||
|
str = `${finalFieldName} IS NOT NULL`;
|
||||||
|
}
|
||||||
else if (typeof queryObj.value == "string" ||
|
else if (typeof queryObj.value == "string" ||
|
||||||
typeof queryObj.value == "number") {
|
typeof queryObj.value == "number") {
|
||||||
const valueParsed = String(queryObj.value);
|
const valueParsed = String(queryObj.value);
|
||||||
|
1
dist/package-shared/types/index.d.ts
vendored
1
dist/package-shared/types/index.d.ts
vendored
@ -977,6 +977,7 @@ export type ServerQueryObject<T extends object = {
|
|||||||
}> = {
|
}> = {
|
||||||
value?: string | string[];
|
value?: string | string[];
|
||||||
nullValue?: boolean;
|
nullValue?: boolean;
|
||||||
|
notNullValue?: boolean;
|
||||||
operator?: (typeof ServerQueryOperators)[number];
|
operator?: (typeof ServerQueryOperators)[number];
|
||||||
equality?: (typeof ServerQueryEqualities)[number];
|
equality?: (typeof ServerQueryEqualities)[number];
|
||||||
tableName?: string;
|
tableName?: string;
|
||||||
|
@ -57,6 +57,8 @@ export default function sqlGenerator<
|
|||||||
|
|
||||||
if (queryObj.nullValue) {
|
if (queryObj.nullValue) {
|
||||||
str = `${finalFieldName} IS NULL`;
|
str = `${finalFieldName} IS NULL`;
|
||||||
|
} else if (queryObj.notNullValue) {
|
||||||
|
str = `${finalFieldName} IS NOT NULL`;
|
||||||
} else if (
|
} else if (
|
||||||
typeof queryObj.value == "string" ||
|
typeof queryObj.value == "string" ||
|
||||||
typeof queryObj.value == "number"
|
typeof queryObj.value == "number"
|
||||||
|
@ -1135,6 +1135,7 @@ export type ServerQueryParam<
|
|||||||
export type ServerQueryObject<T extends object = { [key: string]: any }> = {
|
export type ServerQueryObject<T extends object = { [key: string]: any }> = {
|
||||||
value?: string | string[];
|
value?: string | string[];
|
||||||
nullValue?: boolean;
|
nullValue?: boolean;
|
||||||
|
notNullValue?: boolean;
|
||||||
operator?: (typeof ServerQueryOperators)[number];
|
operator?: (typeof ServerQueryOperators)[number];
|
||||||
equality?: (typeof ServerQueryEqualities)[number];
|
equality?: (typeof ServerQueryEqualities)[number];
|
||||||
tableName?: string;
|
tableName?: string;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "4.7.2",
|
"version": "4.7.3",
|
||||||
"description": "Cloud-based SQL data management tool",
|
"description": "Cloud-based SQL data management tool",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
Loading…
Reference in New Issue
Block a user