@ignisia/sql 0.2.1 → 0.2.2
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/cjs/column/constants.js +101 -0
- package/dist/cjs/column/index.d.cts +42 -0
- package/dist/cjs/column/index.js +107 -0
- package/dist/cjs/column/types.d.cts +43 -0
- package/dist/cjs/column/types.js +4 -0
- package/dist/cjs/database/alter.d.cts +52 -0
- package/dist/cjs/database/alter.js +93 -0
- package/dist/cjs/database/column.d.cts +24 -0
- package/dist/cjs/database/column.js +37 -0
- package/dist/cjs/database/contract.d.cts +8 -0
- package/dist/cjs/database/contract.js +2 -0
- package/dist/cjs/database/index.d.cts +8 -0
- package/dist/cjs/database/index.js +94 -0
- package/dist/cjs/database/table.d.cts +21 -0
- package/dist/cjs/database/table.js +41 -0
- package/dist/cjs/database/types.d.cts +7 -0
- package/dist/cjs/database/types.js +2 -0
- package/dist/cjs/database/wrapper.d.cts +36 -0
- package/dist/cjs/database/wrapper.js +95 -0
- package/dist/cjs/index---zaMa69.d.cts +103 -0
- package/dist/cjs/index-CwiFQh0I.d.cts +358 -0
- package/dist/cjs/index.d.cts +10 -0
- package/dist/cjs/index.js +30 -0
- package/dist/cjs/migration/index.d.cts +30 -0
- package/dist/{migration → cjs/migration}/index.js +3 -1
- package/dist/cjs/migration/runner.js +58 -0
- package/dist/cjs/migration/type.d.cts +19 -0
- package/dist/cjs/migration/type.js +2 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/query/builder.d.cts +14 -0
- package/dist/cjs/query/builder.js +71 -0
- package/dist/cjs/query/condition.d.cts +7 -0
- package/dist/cjs/query/condition.js +106 -0
- package/dist/cjs/query/constants.js +64 -0
- package/dist/cjs/query/contract.d.cts +7 -0
- package/dist/cjs/query/contract.js +2 -0
- package/dist/cjs/query/helper.d.cts +7 -0
- package/dist/cjs/query/helper.js +36 -0
- package/dist/cjs/query/index.d.cts +7 -0
- package/dist/cjs/query/index.js +197 -0
- package/dist/cjs/query/join.d.cts +16 -0
- package/dist/cjs/query/join.js +18 -0
- package/dist/cjs/query/sql.d.cts +17 -0
- package/dist/cjs/query/sql.js +104 -0
- package/dist/cjs/query/types.d.cts +7 -0
- package/dist/cjs/query/types.js +2 -0
- package/dist/cjs/query/utilities.d.cts +34 -0
- package/dist/cjs/query/utilities.js +184 -0
- package/dist/cjs/table/constants.js +8 -0
- package/dist/cjs/table/index.d.cts +7 -0
- package/dist/cjs/table/index.js +54 -0
- package/dist/cjs/table/types.d.cts +7 -0
- package/dist/cjs/table/types.js +2 -0
- package/dist/cjs/table/utilities.d.cts +7 -0
- package/dist/cjs/table/utilities.js +55 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/utilities.js +21 -0
- package/dist/esm/column/constants.d.ts +97 -0
- package/dist/{column → esm/column}/constants.js +4 -3
- package/dist/{column → esm/column}/index.js +6 -5
- package/dist/esm/column/types.js +1 -0
- package/dist/{database → esm/database}/alter.js +2 -1
- package/dist/{database → esm/database}/column.js +2 -1
- package/dist/{database → esm/database}/index.js +10 -9
- package/dist/{database → esm/database}/table.js +2 -1
- package/dist/{database → esm/database}/wrapper.js +6 -5
- package/dist/esm/index.js +5 -0
- package/dist/esm/migration/index.js +49 -0
- package/dist/esm/migration/runner.d.ts +3 -0
- package/dist/{migration → esm/migration}/runner.js +6 -5
- package/dist/{query → esm/query}/builder.js +3 -2
- package/dist/{query → esm/query}/condition.js +4 -3
- package/dist/esm/query/constants.d.ts +63 -0
- package/dist/{query → esm/query}/constants.js +9 -8
- package/dist/{query → esm/query}/helper.js +3 -2
- package/dist/{query → esm/query}/index.js +10 -9
- package/dist/{query → esm/query}/join.js +1 -0
- package/dist/{query → esm/query}/sql.js +4 -3
- package/dist/{query → esm/query}/utilities.js +5 -4
- package/dist/esm/table/constants.d.ts +7 -0
- package/dist/{table → esm/table}/constants.js +2 -1
- package/dist/{table → esm/table}/index.js +6 -5
- package/dist/{table → esm/table}/utilities.js +5 -4
- package/dist/esm/types.d.ts +3 -0
- package/dist/esm/utilities.d.ts +4 -0
- package/dist/{utilities.js → esm/utilities.js} +1 -0
- package/package.json +42 -19
- package/dist/column/types.js +0 -1
- package/dist/index.js +0 -5
- /package/dist/{column/constants.d.ts → cjs/column/constants.d.cts} +0 -0
- /package/dist/{migration/runner.d.ts → cjs/migration/runner.d.cts} +0 -0
- /package/dist/{query/constants.d.ts → cjs/query/constants.d.cts} +0 -0
- /package/dist/{table/constants.d.ts → cjs/table/constants.d.cts} +0 -0
- /package/dist/{types.d.ts → cjs/types.d.cts} +0 -0
- /package/dist/{utilities.d.ts → cjs/utilities.d.cts} +0 -0
- /package/dist/{column → esm/column}/index.d.ts +0 -0
- /package/dist/{column → esm/column}/types.d.ts +0 -0
- /package/dist/{database → esm/database}/alter.d.ts +0 -0
- /package/dist/{database → esm/database}/column.d.ts +0 -0
- /package/dist/{database → esm/database}/contract.d.ts +0 -0
- /package/dist/{database → esm/database}/contract.js +0 -0
- /package/dist/{database → esm/database}/index.d.ts +0 -0
- /package/dist/{database → esm/database}/table.d.ts +0 -0
- /package/dist/{database → esm/database}/types.d.ts +0 -0
- /package/dist/{database → esm/database}/types.js +0 -0
- /package/dist/{database → esm/database}/wrapper.d.ts +0 -0
- /package/dist/{index-DFrpzXEn.d.ts → esm/index-DFrpzXEn.d.ts} +0 -0
- /package/dist/{index-FMT0YEO7.d.ts → esm/index-FMT0YEO7.d.ts} +0 -0
- /package/dist/{index.d.ts → esm/index.d.ts} +0 -0
- /package/dist/{migration → esm/migration}/index.d.ts +0 -0
- /package/dist/{migration → esm/migration}/type.d.ts +0 -0
- /package/dist/{migration → esm/migration}/type.js +0 -0
- /package/dist/{query → esm/query}/builder.d.ts +0 -0
- /package/dist/{query → esm/query}/condition.d.ts +0 -0
- /package/dist/{query → esm/query}/contract.d.ts +0 -0
- /package/dist/{query → esm/query}/contract.js +0 -0
- /package/dist/{query → esm/query}/helper.d.ts +0 -0
- /package/dist/{query → esm/query}/index.d.ts +0 -0
- /package/dist/{query → esm/query}/join.d.ts +0 -0
- /package/dist/{query → esm/query}/sql.d.ts +0 -0
- /package/dist/{query → esm/query}/types.d.ts +0 -0
- /package/dist/{query → esm/query}/types.js +0 -0
- /package/dist/{query → esm/query}/utilities.d.ts +0 -0
- /package/dist/{table → esm/table}/index.d.ts +0 -0
- /package/dist/{table → esm/table}/types.d.ts +0 -0
- /package/dist/{table → esm/table}/types.js +0 -0
- /package/dist/{table → esm/table}/utilities.d.ts +0 -0
- /package/dist/{types.js → esm/types.js} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// src/migration/index.ts
|
|
2
|
+
var Migration = class _Migration {
|
|
3
|
+
db;
|
|
4
|
+
_up;
|
|
5
|
+
_down;
|
|
6
|
+
constructor(options) {
|
|
7
|
+
this.db = options.db;
|
|
8
|
+
this._up = options.up;
|
|
9
|
+
this._down = options.down;
|
|
10
|
+
}
|
|
11
|
+
get up() {
|
|
12
|
+
return this._up;
|
|
13
|
+
}
|
|
14
|
+
get down() {
|
|
15
|
+
return this._down;
|
|
16
|
+
}
|
|
17
|
+
static setUp(migrator, fn) {
|
|
18
|
+
migrator._up = () => fn(migrator.db);
|
|
19
|
+
return migrator;
|
|
20
|
+
}
|
|
21
|
+
static setDown(migrator, fn) {
|
|
22
|
+
migrator._down = () => fn(migrator.db);
|
|
23
|
+
return migrator;
|
|
24
|
+
}
|
|
25
|
+
static define(db, options) {
|
|
26
|
+
const migration = new _Migration({
|
|
27
|
+
db,
|
|
28
|
+
up: options?.up ? () => options.up(db) : null,
|
|
29
|
+
down: options?.down ? () => options.down(db) : null
|
|
30
|
+
});
|
|
31
|
+
return {
|
|
32
|
+
migration,
|
|
33
|
+
setUp(fn) {
|
|
34
|
+
return _Migration.setUp(
|
|
35
|
+
migration,
|
|
36
|
+
fn
|
|
37
|
+
);
|
|
38
|
+
},
|
|
39
|
+
setDown(fn) {
|
|
40
|
+
return _Migration.setDown(
|
|
41
|
+
migration,
|
|
42
|
+
fn
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { Migration };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Column } from '../column';
|
|
2
|
-
import { Table } from '../table';
|
|
1
|
+
import { Column } from '../column/index.js';
|
|
2
|
+
import { Table } from '../table/index.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/migration/runner.ts
|
|
5
|
+
var nameColumn = Column.define({
|
|
5
6
|
type: "TEXT",
|
|
6
7
|
length: 255
|
|
7
8
|
}).primaryKey().notNull();
|
|
8
|
-
|
|
9
|
+
var runAtColumn = Column.define({
|
|
9
10
|
type: "DATETIME"
|
|
10
11
|
}).notNull();
|
|
11
|
-
|
|
12
|
+
var migrationTable = null;
|
|
12
13
|
async function runMigration(filePath, direction) {
|
|
13
14
|
const migrationFile = await import(filePath);
|
|
14
15
|
const fileName = filePath.split("/").pop();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { quoteIdentifier } from '../utilities';
|
|
2
|
-
import { getTableSelectName } from './utilities';
|
|
1
|
+
import { quoteIdentifier } from '../utilities.js';
|
|
2
|
+
import { getTableSelectName } from './utilities.js';
|
|
3
3
|
|
|
4
|
+
// src/query/builder.ts
|
|
4
5
|
function buildSelectQuery(q) {
|
|
5
6
|
const from = getTableSelectName(q);
|
|
6
7
|
const columns = [];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { LogicalOperator, ConditionClause, AcceptedOperator } from './constants';
|
|
2
|
-
import { rawCol } from './helper';
|
|
3
|
-
import { getCondition } from './utilities';
|
|
1
|
+
import { LogicalOperator, ConditionClause, AcceptedOperator } from './constants.js';
|
|
2
|
+
import { rawCol } from './helper.js';
|
|
3
|
+
import { getCondition } from './utilities.js';
|
|
4
4
|
|
|
5
|
+
// src/query/condition.ts
|
|
5
6
|
function addRawCondition(query, clause, column, logical, params) {
|
|
6
7
|
const validClause = clause.toLowerCase();
|
|
7
8
|
if (!query.definition[validClause]) query.definition[validClause] = [];
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const LogicalOperator: {
|
|
2
|
+
readonly AND: "AND";
|
|
3
|
+
readonly OR: "OR";
|
|
4
|
+
};
|
|
5
|
+
type LogicalOperator = (typeof LogicalOperator)[keyof typeof LogicalOperator];
|
|
6
|
+
declare const ConditionClause: {
|
|
7
|
+
readonly WHERE: "WHERE";
|
|
8
|
+
readonly HAVING: "HAVING";
|
|
9
|
+
};
|
|
10
|
+
type ConditionClause = (typeof ConditionClause)[keyof typeof ConditionClause];
|
|
11
|
+
declare const AcceptedOperator: {
|
|
12
|
+
readonly EQ: "eq";
|
|
13
|
+
readonly NE: "ne";
|
|
14
|
+
readonly GT: "gt";
|
|
15
|
+
readonly LT: "lt";
|
|
16
|
+
readonly GTE: "gte";
|
|
17
|
+
readonly LTE: "lte";
|
|
18
|
+
readonly IN: "in";
|
|
19
|
+
readonly NOT_IN: "notIn";
|
|
20
|
+
readonly LIKE: "like";
|
|
21
|
+
readonly NOT_LIKE: "notLike";
|
|
22
|
+
readonly ILIKE: "ilike";
|
|
23
|
+
readonly NOT_ILIKE: "notILike";
|
|
24
|
+
readonly IS_NULL: "isNull";
|
|
25
|
+
readonly IS_NOT_NULL: "isNotNull";
|
|
26
|
+
readonly BETWEEN: "between";
|
|
27
|
+
readonly NOT_BETWEEN: "notBetween";
|
|
28
|
+
};
|
|
29
|
+
type AcceptedOperator = (typeof AcceptedOperator)[keyof typeof AcceptedOperator];
|
|
30
|
+
declare const QueryType: {
|
|
31
|
+
readonly SELECT: "SELECT";
|
|
32
|
+
readonly INSERT: "INSERT";
|
|
33
|
+
readonly UPDATE: "UPDATE";
|
|
34
|
+
readonly DELETE: "DELETE";
|
|
35
|
+
};
|
|
36
|
+
type QueryType = (typeof QueryType)[keyof typeof QueryType];
|
|
37
|
+
declare const OrderBy: {
|
|
38
|
+
readonly ASC: "ASC";
|
|
39
|
+
readonly DESC: "DESC";
|
|
40
|
+
};
|
|
41
|
+
type OrderBy = (typeof OrderBy)[keyof typeof OrderBy];
|
|
42
|
+
declare const AggregationFunction: {
|
|
43
|
+
readonly COUNT: "COUNT";
|
|
44
|
+
readonly SUM: "SUM";
|
|
45
|
+
readonly MIN: "MIN";
|
|
46
|
+
readonly MAX: "MAX";
|
|
47
|
+
readonly AVG: "AVG";
|
|
48
|
+
};
|
|
49
|
+
type AggregationFunction = (typeof AggregationFunction)[keyof typeof AggregationFunction];
|
|
50
|
+
declare const AcceptedJoin: {
|
|
51
|
+
readonly INNER: "INNER";
|
|
52
|
+
readonly LEFT: "LEFT";
|
|
53
|
+
readonly RIGHT: "RIGHT";
|
|
54
|
+
readonly NATURAL: "NATURAL";
|
|
55
|
+
};
|
|
56
|
+
type AcceptedJoin = (typeof AcceptedJoin)[keyof typeof AcceptedJoin];
|
|
57
|
+
declare const QueryHooksType: {
|
|
58
|
+
readonly AFTER: "after";
|
|
59
|
+
readonly BEFORE: "before";
|
|
60
|
+
};
|
|
61
|
+
type QueryHooksType = (typeof QueryHooksType)[keyof typeof QueryHooksType];
|
|
62
|
+
|
|
63
|
+
export { AcceptedJoin, AcceptedOperator, AggregationFunction, ConditionClause, LogicalOperator, OrderBy, QueryHooksType, QueryType };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
// src/query/constants.ts
|
|
2
|
+
var LogicalOperator = {
|
|
2
3
|
AND: "AND",
|
|
3
4
|
OR: "OR"
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
+
var ConditionClause = {
|
|
6
7
|
WHERE: "WHERE",
|
|
7
8
|
HAVING: "HAVING"
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
var AcceptedOperator = {
|
|
10
11
|
EQ: "eq",
|
|
11
12
|
NE: "ne",
|
|
12
13
|
GT: "gt",
|
|
@@ -24,30 +25,30 @@ const AcceptedOperator = {
|
|
|
24
25
|
BETWEEN: "between",
|
|
25
26
|
NOT_BETWEEN: "notBetween"
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
var QueryType = {
|
|
28
29
|
SELECT: "SELECT",
|
|
29
30
|
INSERT: "INSERT",
|
|
30
31
|
UPDATE: "UPDATE",
|
|
31
32
|
DELETE: "DELETE"
|
|
32
33
|
};
|
|
33
|
-
|
|
34
|
+
var OrderBy = {
|
|
34
35
|
ASC: "ASC",
|
|
35
36
|
DESC: "DESC"
|
|
36
37
|
};
|
|
37
|
-
|
|
38
|
+
var AggregationFunction = {
|
|
38
39
|
COUNT: "COUNT",
|
|
39
40
|
SUM: "SUM",
|
|
40
41
|
MIN: "MIN",
|
|
41
42
|
MAX: "MAX",
|
|
42
43
|
AVG: "AVG"
|
|
43
44
|
};
|
|
44
|
-
|
|
45
|
+
var AcceptedJoin = {
|
|
45
46
|
INNER: "INNER",
|
|
46
47
|
LEFT: "LEFT",
|
|
47
48
|
RIGHT: "RIGHT",
|
|
48
49
|
NATURAL: "NATURAL"
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
+
var QueryHooksType = {
|
|
51
52
|
AFTER: "after",
|
|
52
53
|
BEFORE: "before"
|
|
53
54
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { QueryBuilder } from '.';
|
|
2
|
-
import { deepClone } from '../utilities';
|
|
1
|
+
import { QueryBuilder } from './index.js';
|
|
2
|
+
import { deepClone } from '../utilities.js';
|
|
3
3
|
|
|
4
|
+
// src/query/helper.ts
|
|
4
5
|
function alias(alias2) {
|
|
5
6
|
this.definition.baseAlias = alias2;
|
|
6
7
|
return this;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { quoteIdentifier } from '../utilities';
|
|
2
|
-
import { rawWhere, rawHaving, rawOr, where, having, or } from './condition';
|
|
3
|
-
import { AcceptedJoin, QueryType } from './constants';
|
|
4
|
-
import { alias, clone, aggregateCol, col } from './helper';
|
|
5
|
-
import { addJoin } from './join';
|
|
6
|
-
import { toQuery, toString, exec } from './sql';
|
|
7
|
-
import { getTimestamp, getParanoid } from './utilities';
|
|
1
|
+
import { quoteIdentifier } from '../utilities.js';
|
|
2
|
+
import { rawWhere, rawHaving, rawOr, where, having, or } from './condition.js';
|
|
3
|
+
import { AcceptedJoin, QueryType } from './constants.js';
|
|
4
|
+
import { alias, clone, aggregateCol, col } from './helper.js';
|
|
5
|
+
import { addJoin } from './join.js';
|
|
6
|
+
import { toQuery, toString, exec } from './sql.js';
|
|
7
|
+
import { getTimestamp, getParanoid } from './utilities.js';
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/query/index.ts
|
|
10
|
+
var QueryBuilder = class {
|
|
10
11
|
hooks;
|
|
11
12
|
table;
|
|
12
13
|
definition;
|
|
@@ -190,6 +191,6 @@ class QueryBuilder {
|
|
|
190
191
|
infer() {
|
|
191
192
|
return null;
|
|
192
193
|
}
|
|
193
|
-
}
|
|
194
|
+
};
|
|
194
195
|
|
|
195
196
|
export { QueryBuilder };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { buildDeleteQuery, buildUpdateQuery, buildInsertQuery, buildSelectQuery } from './builder';
|
|
2
|
-
import { QueryType, QueryHooksType } from './constants';
|
|
3
|
-
import { getWhereConditions, getGroupByConditions, parseAliasedRow } from './utilities';
|
|
1
|
+
import { buildDeleteQuery, buildUpdateQuery, buildInsertQuery, buildSelectQuery } from './builder.js';
|
|
2
|
+
import { QueryType, QueryHooksType } from './constants.js';
|
|
3
|
+
import { getWhereConditions, getGroupByConditions, parseAliasedRow } from './utilities.js';
|
|
4
4
|
|
|
5
|
+
// src/query/sql.ts
|
|
5
6
|
function buildQuery(query) {
|
|
6
7
|
let index = 0;
|
|
7
8
|
return query.replace(/\?/g, () => {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import '.';
|
|
2
|
-
import { Dialect } from '../table/constants';
|
|
3
|
-
import { quoteIdentifier } from '../utilities';
|
|
4
|
-
import { AcceptedOperator, QueryType } from './constants';
|
|
1
|
+
import './index.js';
|
|
2
|
+
import { Dialect } from '../table/constants.js';
|
|
3
|
+
import { quoteIdentifier } from '../utilities.js';
|
|
4
|
+
import { AcceptedOperator, QueryType } from './constants.js';
|
|
5
5
|
|
|
6
|
+
// src/query/utilities.ts
|
|
6
7
|
function getTableColumnNames(column, baseAlias, baseTable, joinedTables) {
|
|
7
8
|
const [tableAlias] = column.split(".");
|
|
8
9
|
const isOnBase = tableAlias === baseAlias;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { QueryBuilder } from '../query';
|
|
2
|
-
import { defineColumns } from './utilities';
|
|
1
|
+
import { QueryBuilder } from '../query/index.js';
|
|
2
|
+
import { defineColumns } from './utilities.js';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/table/index.ts
|
|
5
|
+
var Table = class _Table {
|
|
5
6
|
client;
|
|
6
7
|
dialect;
|
|
7
8
|
name;
|
|
@@ -25,7 +26,7 @@ class Table {
|
|
|
25
26
|
}
|
|
26
27
|
static define(options) {
|
|
27
28
|
const columns = defineColumns(options);
|
|
28
|
-
return new
|
|
29
|
+
return new _Table({
|
|
29
30
|
...options,
|
|
30
31
|
columns
|
|
31
32
|
});
|
|
@@ -47,6 +48,6 @@ class Table {
|
|
|
47
48
|
query() {
|
|
48
49
|
return new QueryBuilder(this);
|
|
49
50
|
}
|
|
50
|
-
}
|
|
51
|
+
};
|
|
51
52
|
|
|
52
53
|
export { Table };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Column } from '../column';
|
|
1
|
+
import { Column } from '../column/index.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/table/utilities.ts
|
|
4
|
+
var createdAt = Column.define({
|
|
4
5
|
type: "DATETIME"
|
|
5
6
|
}).default("CURRENT_TIMESTAMP");
|
|
6
|
-
|
|
7
|
+
var updatedAt = Column.define({
|
|
7
8
|
type: "DATETIME"
|
|
8
9
|
});
|
|
9
|
-
|
|
10
|
+
var deletedAt = Column.define({
|
|
10
11
|
type: "DATETIME"
|
|
11
12
|
});
|
|
12
13
|
function defineColumns(options) {
|
package/package.json
CHANGED
|
@@ -1,42 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ignisia/sql",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"main": "dist/cjs/index.js",
|
|
4
|
+
"module": "dist/esm/index.js",
|
|
5
|
+
"types": "./dist/esm/index.d.ts",
|
|
6
|
+
"version": "0.2.2",
|
|
6
7
|
"type": "module",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
10
|
+
"types": "./dist/esm/index.d.ts",
|
|
11
|
+
"import": "./dist/esm/index.js",
|
|
12
|
+
"require": "./dist/cjs/index.js"
|
|
11
13
|
},
|
|
12
14
|
"./*": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
+
"types": "./dist/esm/*.d.ts",
|
|
16
|
+
"import": "./dist/esm/*.js",
|
|
17
|
+
"require": "./dist/cjs/*.js"
|
|
15
18
|
},
|
|
16
19
|
"./**/*": {
|
|
17
|
-
"
|
|
18
|
-
"
|
|
20
|
+
"types": "./dist/esm/**/*.d.ts",
|
|
21
|
+
"import": "./dist/esm/**/*.js",
|
|
22
|
+
"require": "./dist/cjs/**/*.js"
|
|
19
23
|
},
|
|
20
24
|
"./package.json": "./package.json",
|
|
21
25
|
"./column": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
26
|
+
"types": "./dist/esm/column/index.d.ts",
|
|
27
|
+
"import": "./dist/esm/column/index.js",
|
|
28
|
+
"require": "./dist/cjs/column/index.js"
|
|
24
29
|
},
|
|
25
30
|
"./database": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
31
|
+
"types": "./dist/esm/database/index.d.ts",
|
|
32
|
+
"import": "./dist/esm/database/index.js",
|
|
33
|
+
"require": "./dist/cjs/database/index.js"
|
|
28
34
|
},
|
|
29
35
|
"./migration": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
36
|
+
"types": "./dist/esm/migration/index.d.ts",
|
|
37
|
+
"import": "./dist/esm/migration/index.js",
|
|
38
|
+
"require": "./dist/cjs/migration/index.js"
|
|
32
39
|
},
|
|
33
40
|
"./query": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
41
|
+
"types": "./dist/esm/query/index.d.ts",
|
|
42
|
+
"import": "./dist/esm/query/index.js",
|
|
43
|
+
"require": "./dist/cjs/query/index.js"
|
|
36
44
|
},
|
|
37
45
|
"./table": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
46
|
+
"types": "./dist/esm/table/index.d.ts",
|
|
47
|
+
"import": "./dist/esm/table/index.js",
|
|
48
|
+
"require": "./dist/cjs/table/index.js"
|
|
40
49
|
}
|
|
41
50
|
},
|
|
42
51
|
"scripts": {
|
|
@@ -51,5 +60,19 @@
|
|
|
51
60
|
},
|
|
52
61
|
"files": [
|
|
53
62
|
"dist"
|
|
63
|
+
],
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/krsbx/aio-web.git"
|
|
67
|
+
},
|
|
68
|
+
"bugs": {
|
|
69
|
+
"url": "https://github.com/krsbx/aio-web/issues"
|
|
70
|
+
},
|
|
71
|
+
"keywords": [
|
|
72
|
+
"bun",
|
|
73
|
+
"sql",
|
|
74
|
+
"database",
|
|
75
|
+
"sqlite",
|
|
76
|
+
"postgres"
|
|
54
77
|
]
|
|
55
78
|
}
|
package/dist/column/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './constants';
|
package/dist/index.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|