@budibase/backend-core 2.27.4 → 2.27.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1399 -160
- package/dist/index.js.map +4 -4
- package/dist/index.js.meta.json +1 -1
- package/dist/package.json +5 -4
- package/dist/plugins.js.meta.json +1 -1
- package/dist/src/constants/db.d.ts +6 -0
- package/dist/src/constants/db.js +7 -1
- package/dist/src/constants/db.js.map +1 -1
- package/dist/src/environment.d.ts +2 -0
- package/dist/src/environment.js +2 -0
- package/dist/src/environment.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +2 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/sql/designDoc.d.ts +2 -0
- package/dist/src/sql/designDoc.js +20 -0
- package/dist/src/sql/designDoc.js.map +1 -0
- package/dist/src/sql/index.d.ts +4 -0
- package/dist/src/sql/index.js +36 -0
- package/dist/src/sql/index.js.map +1 -0
- package/dist/src/sql/sql.d.ts +21 -0
- package/dist/src/sql/sql.js +752 -0
- package/dist/src/sql/sql.js.map +1 -0
- package/dist/src/sql/sqlStatements.d.ts +14 -0
- package/dist/src/sql/sqlStatements.js +60 -0
- package/dist/src/sql/sqlStatements.js.map +1 -0
- package/dist/src/sql/sqlTable.d.ts +13 -0
- package/dist/src/sql/sqlTable.js +231 -0
- package/dist/src/sql/sqlTable.js.map +1 -0
- package/dist/src/sql/utils.d.ts +22 -0
- package/dist/src/sql/utils.js +133 -0
- package/dist/src/sql/utils.js.map +1 -0
- package/dist/tests/core/utilities/mocks/licenses.d.ts +1 -0
- package/dist/tests/core/utilities/mocks/licenses.js +5 -1
- package/dist/tests/core/utilities/mocks/licenses.js.map +1 -1
- package/package.json +5 -4
- package/src/constants/db.ts +6 -0
- package/src/environment.ts +3 -0
- package/src/index.ts +1 -0
- package/src/sql/designDoc.ts +17 -0
- package/src/sql/index.ts +5 -0
- package/src/sql/sql.ts +852 -0
- package/src/sql/sqlStatements.ts +79 -0
- package/src/sql/sqlTable.ts +289 -0
- package/src/sql/utils.ts +134 -0
- package/tests/core/utilities/mocks/licenses.ts +4 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import SqlTableQueryBuilder from "./sqlTable";
|
|
2
|
+
import { BBReferenceFieldMetadata, FieldSchema, JsonFieldMetadata, Operation, QueryJson, SqlQuery, SqlQueryBinding, Table, QueryOptions } from "@budibase/types";
|
|
3
|
+
type QueryFunction = (query: SqlQuery | SqlQuery[], operation: Operation) => any;
|
|
4
|
+
declare class SqlQueryBuilder extends SqlTableQueryBuilder {
|
|
5
|
+
private readonly limit;
|
|
6
|
+
constructor(client: string, limit?: number);
|
|
7
|
+
/**
|
|
8
|
+
* @param json The JSON query DSL which is to be converted to SQL.
|
|
9
|
+
* @param opts extra options which are to be passed into the query builder, e.g. disableReturning
|
|
10
|
+
* which for the sake of mySQL stops adding the returning statement to inserts, updates and deletes.
|
|
11
|
+
* @return the query ready to be passed to the driver.
|
|
12
|
+
*/
|
|
13
|
+
_query(json: QueryJson, opts?: QueryOptions): SqlQuery | SqlQuery[];
|
|
14
|
+
getReturningRow(queryFn: QueryFunction, json: QueryJson): Promise<any>;
|
|
15
|
+
checkLookupKeys(id: any, json: QueryJson): QueryJson;
|
|
16
|
+
queryWithReturning(json: QueryJson, queryFn: QueryFunction, processFn?: Function): Promise<any>;
|
|
17
|
+
convertJsonStringColumns<T extends Record<string, any>>(table: Table, results: T[], aliases?: Record<string, string>): T[];
|
|
18
|
+
_isJsonColumn(field: FieldSchema): field is JsonFieldMetadata | BBReferenceFieldMetadata;
|
|
19
|
+
log(query: string, values?: SqlQueryBinding): void;
|
|
20
|
+
}
|
|
21
|
+
export default SqlQueryBuilder;
|