@vanit-co/sql-ts 0.3.0 → 0.5.0
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.d.ts +1 -3
- package/dist/index.js +10 -6
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -51,8 +51,6 @@ declare const as: (col: { [K in symbol]: Column; }) => string;
|
|
|
51
51
|
declare const sql: (strings: TemplateStringsArray, ...binds: Array<any>) => Result;
|
|
52
52
|
declare const select: (strings: TemplateStringsArray, ...binds: Array<any>) => Result;
|
|
53
53
|
declare const selectAs: (strings: TemplateStringsArray, ...binds: Array<any>) => Result;
|
|
54
|
-
declare const join: (strings: TemplateStringsArray, ...binds: Array<any>) => Result;
|
|
55
|
-
declare const where: (strings: TemplateStringsArray, ...binds: Array<any>) => Result;
|
|
56
54
|
declare const empty: Result;
|
|
57
55
|
declare const insert: <T extends string>(table: SchemaTable<T>, ...colsVals: Array<{ [K in T]?: any; }>) => Result;
|
|
58
56
|
declare const update: <T extends string>(table: SchemaTable<T>, colsVals: { [K in T]?: any; }) => Result;
|
|
@@ -69,4 +67,4 @@ declare const pick: (...columns: Array<{
|
|
|
69
67
|
}>) => Value;
|
|
70
68
|
declare const raw: (content: string) => Value;
|
|
71
69
|
|
|
72
|
-
export { all, as, concat, empty, insert,
|
|
70
|
+
export { all, as, concat, empty, select as g, select as groupBy, select as h, select as having, insert, select as j, select as join, select as o, select as orderBy, pick, preparedStatementName, raw, select as s, selectAs as sa, schema, select, selectAs, sql, toMysql, toPostgres, update, select as w, select as where };
|
package/dist/index.js
CHANGED
|
@@ -119,8 +119,6 @@ const buildTag = (fn) => (strings, ...binds) => {
|
|
|
119
119
|
const sql = buildTag(pure);
|
|
120
120
|
const select = buildTag(prefix);
|
|
121
121
|
const selectAs = buildTag(alias);
|
|
122
|
-
const join = select;
|
|
123
|
-
const where = select;
|
|
124
122
|
const empty = sql ``;
|
|
125
123
|
const insert = (table, ...colsVals) => {
|
|
126
124
|
const tableName = table[SYM_TABLE].name;
|
|
@@ -157,9 +155,15 @@ exports.all = all;
|
|
|
157
155
|
exports.as = as;
|
|
158
156
|
exports.concat = concat;
|
|
159
157
|
exports.empty = empty;
|
|
158
|
+
exports.g = select;
|
|
159
|
+
exports.groupBy = select;
|
|
160
|
+
exports.h = select;
|
|
161
|
+
exports.having = select;
|
|
160
162
|
exports.insert = insert;
|
|
161
|
-
exports.j =
|
|
162
|
-
exports.join =
|
|
163
|
+
exports.j = select;
|
|
164
|
+
exports.join = select;
|
|
165
|
+
exports.o = select;
|
|
166
|
+
exports.orderBy = select;
|
|
163
167
|
exports.pick = pick;
|
|
164
168
|
exports.preparedStatementName = preparedStatementName;
|
|
165
169
|
exports.raw = raw;
|
|
@@ -172,6 +176,6 @@ exports.sql = sql;
|
|
|
172
176
|
exports.toMysql = toMysql;
|
|
173
177
|
exports.toPostgres = toPostgres;
|
|
174
178
|
exports.update = update;
|
|
175
|
-
exports.w =
|
|
176
|
-
exports.where =
|
|
179
|
+
exports.w = select;
|
|
180
|
+
exports.where = select;
|
|
177
181
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vanit-co/sql-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "A TypeScript SQL query builder using tagged template literals. Write plain SQL with safe, automatic parameter binding and properly quoted identifiers. No DSL to learn, no magic, no ORM.",
|
|
5
|
-
"type": "
|
|
5
|
+
"type": "commonjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"files": [
|