rawsql-ts 0.9.0-beta → 0.10.1-beta
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/README.md +90 -7
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/SqlPrintToken.js +2 -0
- package/dist/esm/models/SqlPrintToken.js.map +1 -1
- package/dist/esm/models/ValueComponent.js +13 -12
- package/dist/esm/models/ValueComponent.js.map +1 -1
- package/dist/esm/parsers/SqlPrintTokenParser.js +24 -6
- package/dist/esm/parsers/SqlPrintTokenParser.js.map +1 -1
- package/dist/esm/transformers/PostgresArrayEntityCteBuilder.js +231 -0
- package/dist/esm/transformers/PostgresArrayEntityCteBuilder.js.map +1 -0
- package/dist/esm/transformers/PostgresJsonQueryBuilder.js +226 -0
- package/dist/esm/transformers/PostgresJsonQueryBuilder.js.map +1 -0
- package/dist/esm/transformers/PostgresObjectEntityCteBuilder.js +283 -0
- package/dist/esm/transformers/PostgresObjectEntityCteBuilder.js.map +1 -0
- package/dist/esm/transformers/SqlPrinter.js +9 -3
- package/dist/esm/transformers/SqlPrinter.js.map +1 -1
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/types/models/SqlPrintToken.d.ts +2 -0
- package/dist/esm/types/models/ValueComponent.d.ts +2 -2
- package/dist/esm/types/transformers/PostgresArrayEntityCteBuilder.d.ts +97 -0
- package/dist/esm/types/transformers/PostgresJsonQueryBuilder.d.ts +86 -0
- package/dist/esm/types/transformers/PostgresObjectEntityCteBuilder.d.ts +140 -0
- package/dist/esm/types/utils/SchemaManager.d.ts +132 -0
- package/dist/esm/utils/SchemaManager.js +194 -0
- package/dist/esm/utils/SchemaManager.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/models/SqlPrintToken.d.ts +2 -0
- package/dist/models/SqlPrintToken.js +2 -0
- package/dist/models/SqlPrintToken.js.map +1 -1
- package/dist/models/ValueComponent.d.ts +2 -2
- package/dist/models/ValueComponent.js +13 -12
- package/dist/models/ValueComponent.js.map +1 -1
- package/dist/parsers/SelectQueryParser.js +3 -14
- package/dist/parsers/SelectQueryParser.js.map +1 -1
- package/dist/parsers/SqlPrintTokenParser.js +25 -7
- package/dist/parsers/SqlPrintTokenParser.js.map +1 -1
- package/dist/transformers/PostgresArrayEntityCteBuilder.d.ts +97 -0
- package/dist/transformers/PostgresArrayEntityCteBuilder.js +235 -0
- package/dist/transformers/PostgresArrayEntityCteBuilder.js.map +1 -0
- package/dist/transformers/PostgresJsonQueryBuilder.d.ts +86 -0
- package/dist/transformers/PostgresJsonQueryBuilder.js +230 -0
- package/dist/transformers/PostgresJsonQueryBuilder.js.map +1 -0
- package/dist/transformers/PostgresObjectEntityCteBuilder.d.ts +140 -0
- package/dist/transformers/PostgresObjectEntityCteBuilder.js +287 -0
- package/dist/transformers/PostgresObjectEntityCteBuilder.js.map +1 -0
- package/dist/transformers/SqlFormatter.js +6 -1
- package/dist/transformers/SqlFormatter.js.map +1 -1
- package/dist/transformers/SqlPrinter.js +9 -3
- package/dist/transformers/SqlPrinter.js.map +1 -1
- package/dist/utils/SchemaManager.d.ts +132 -0
- package/dist/utils/SchemaManager.js +201 -0
- package/dist/utils/SchemaManager.js.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1,132 @@
|
|
1
|
+
/**
|
2
|
+
* Schema Manager for rawsql-ts
|
3
|
+
* Provides unified schema definition and automatic conversion to various formats
|
4
|
+
* Eliminates code duplication and provides type-safe schema management
|
5
|
+
*/
|
6
|
+
import type { JsonMapping } from '../transformers/PostgresJsonQueryBuilder';
|
7
|
+
/**
|
8
|
+
* Database column metadata for schema mapping
|
9
|
+
*/
|
10
|
+
export interface ColumnDefinition {
|
11
|
+
/** Column name in database */
|
12
|
+
name: string;
|
13
|
+
/** Primary key indicator - used for UPDATE/DELETE query WHERE conditions */
|
14
|
+
isPrimaryKey?: boolean;
|
15
|
+
/** Foreign key reference */
|
16
|
+
foreignKey?: {
|
17
|
+
table: string;
|
18
|
+
column: string;
|
19
|
+
};
|
20
|
+
/** Alias for JSON output (useful for avoiding conflicts) */
|
21
|
+
jsonAlias?: string;
|
22
|
+
}
|
23
|
+
/**
|
24
|
+
* Table relationship definition
|
25
|
+
*/
|
26
|
+
export interface RelationshipDefinition {
|
27
|
+
/** Type of relationship */
|
28
|
+
type: 'object' | 'array';
|
29
|
+
/** Target table name */
|
30
|
+
table: string;
|
31
|
+
/** Property name in JSON output */
|
32
|
+
propertyName: string;
|
33
|
+
/** Optional: Override target table's primary key */
|
34
|
+
targetKey?: string;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* Complete table schema definition that users write
|
38
|
+
*/
|
39
|
+
export interface TableDefinition {
|
40
|
+
/** Table name in database */
|
41
|
+
name: string;
|
42
|
+
/** Human-readable entity name */
|
43
|
+
displayName?: string;
|
44
|
+
/** Column definitions */
|
45
|
+
columns: Record<string, ColumnDefinition>;
|
46
|
+
/** Relationships with other tables */
|
47
|
+
relationships?: RelationshipDefinition[];
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Schema registry containing all table definitions
|
51
|
+
*/
|
52
|
+
export interface SchemaRegistry {
|
53
|
+
[tableName: string]: TableDefinition;
|
54
|
+
}
|
55
|
+
/**
|
56
|
+
* Central schema management utility for rawsql-ts
|
57
|
+
* Converts user-defined schemas to various internal formats
|
58
|
+
*/
|
59
|
+
export declare class SchemaManager {
|
60
|
+
private schemas;
|
61
|
+
constructor(schemas: SchemaRegistry);
|
62
|
+
/**
|
63
|
+
* Validate schema definitions for consistency
|
64
|
+
* Ensures each table has a primary key (required for UPDATE/DELETE operations)
|
65
|
+
* and validates relationship references
|
66
|
+
*/
|
67
|
+
private validateSchemas;
|
68
|
+
/**
|
69
|
+
* Get table column names for SqlParamInjector TableColumnResolver
|
70
|
+
* @param tableName Name of the table
|
71
|
+
* @returns Array of column names
|
72
|
+
*/
|
73
|
+
getTableColumns(tableName: string): string[];
|
74
|
+
/**
|
75
|
+
* Create TableColumnResolver function for SqlParamInjector
|
76
|
+
* @returns Function compatible with SqlParamInjector
|
77
|
+
*/
|
78
|
+
createTableColumnResolver(): (tableName: string) => string[];
|
79
|
+
/**
|
80
|
+
* Generate JSON mapping configuration for PostgresJsonQueryBuilder
|
81
|
+
* @param rootTableName Root table for the JSON structure
|
82
|
+
* @returns JSON mapping configuration
|
83
|
+
*/
|
84
|
+
createJsonMapping(rootTableName: string): JsonMapping;
|
85
|
+
/**
|
86
|
+
* Get all table names in the schema
|
87
|
+
* @returns Array of table names
|
88
|
+
*/
|
89
|
+
getTableNames(): string[];
|
90
|
+
/**
|
91
|
+
* Get table definition by name
|
92
|
+
* @param tableName Name of the table
|
93
|
+
* @returns Table definition or undefined
|
94
|
+
*/
|
95
|
+
getTable(tableName: string): TableDefinition | undefined;
|
96
|
+
/**
|
97
|
+
* Get primary key column name for a table
|
98
|
+
* Used by QueryBuilder.buildUpdateQuery for WHERE clause conditions
|
99
|
+
* @param tableName Name of the table
|
100
|
+
* @returns Primary key column name or undefined
|
101
|
+
*/
|
102
|
+
getPrimaryKey(tableName: string): string | undefined;
|
103
|
+
/**
|
104
|
+
* Get foreign key relationships for a table
|
105
|
+
* @param tableName Name of the table
|
106
|
+
* @returns Array of foreign key relationships
|
107
|
+
*/
|
108
|
+
getForeignKeys(tableName: string): Array<{
|
109
|
+
column: string;
|
110
|
+
referencedTable: string;
|
111
|
+
referencedColumn: string;
|
112
|
+
}>;
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* Create a SchemaManager instance from schema definitions
|
116
|
+
* @param schemas Schema registry object
|
117
|
+
* @returns SchemaManager instance
|
118
|
+
*/
|
119
|
+
export declare function createSchemaManager(schemas: SchemaRegistry): SchemaManager;
|
120
|
+
/**
|
121
|
+
* Create TableColumnResolver function from schema definitions
|
122
|
+
* @param schemas Schema registry object
|
123
|
+
* @returns TableColumnResolver function for SqlParamInjector
|
124
|
+
*/
|
125
|
+
export declare function createTableColumnResolver(schemas: SchemaRegistry): (tableName: string) => string[];
|
126
|
+
/**
|
127
|
+
* Create JSON mapping from schema definitions
|
128
|
+
* @param schemas Schema registry object
|
129
|
+
* @param rootTableName Root table name
|
130
|
+
* @returns JSON mapping for PostgresJsonQueryBuilder
|
131
|
+
*/
|
132
|
+
export declare function createJsonMappingFromSchema(schemas: SchemaRegistry, rootTableName: string): JsonMapping;
|
@@ -0,0 +1,201 @@
|
|
1
|
+
"use strict";
|
2
|
+
/**
|
3
|
+
* Schema Manager for rawsql-ts
|
4
|
+
* Provides unified schema definition and automatic conversion to various formats
|
5
|
+
* Eliminates code duplication and provides type-safe schema management
|
6
|
+
*/
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
8
|
+
exports.SchemaManager = void 0;
|
9
|
+
exports.createSchemaManager = createSchemaManager;
|
10
|
+
exports.createTableColumnResolver = createTableColumnResolver;
|
11
|
+
exports.createJsonMappingFromSchema = createJsonMappingFromSchema;
|
12
|
+
// === Schema Manager Class ===
|
13
|
+
/**
|
14
|
+
* Central schema management utility for rawsql-ts
|
15
|
+
* Converts user-defined schemas to various internal formats
|
16
|
+
*/
|
17
|
+
class SchemaManager {
|
18
|
+
constructor(schemas) {
|
19
|
+
this.schemas = schemas;
|
20
|
+
this.validateSchemas();
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* Validate schema definitions for consistency
|
24
|
+
* Ensures each table has a primary key (required for UPDATE/DELETE operations)
|
25
|
+
* and validates relationship references
|
26
|
+
*/
|
27
|
+
validateSchemas() {
|
28
|
+
const tableNames = Object.keys(this.schemas);
|
29
|
+
const errors = [];
|
30
|
+
// Validate each table
|
31
|
+
Object.entries(this.schemas).forEach(([tableName, table]) => {
|
32
|
+
var _a;
|
33
|
+
// Check primary key exists (required for UPDATE/DELETE WHERE conditions)
|
34
|
+
const primaryKeys = Object.entries(table.columns)
|
35
|
+
.filter(([_, col]) => col.isPrimaryKey)
|
36
|
+
.map(([name, _]) => name);
|
37
|
+
if (primaryKeys.length === 0) {
|
38
|
+
errors.push(`Table '${tableName}' has no primary key defined`);
|
39
|
+
}
|
40
|
+
// Validate foreign key references
|
41
|
+
(_a = table.relationships) === null || _a === void 0 ? void 0 : _a.forEach(rel => {
|
42
|
+
if (!tableNames.includes(rel.table)) {
|
43
|
+
errors.push(`Table '${tableName}' references unknown table '${rel.table}' in relationship`);
|
44
|
+
}
|
45
|
+
});
|
46
|
+
});
|
47
|
+
if (errors.length > 0) {
|
48
|
+
throw new Error(`Schema validation failed:\\n${errors.join('\\n')}`);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
/**
|
52
|
+
* Get table column names for SqlParamInjector TableColumnResolver
|
53
|
+
* @param tableName Name of the table
|
54
|
+
* @returns Array of column names
|
55
|
+
*/
|
56
|
+
getTableColumns(tableName) {
|
57
|
+
const table = this.schemas[tableName];
|
58
|
+
if (!table) {
|
59
|
+
return [];
|
60
|
+
}
|
61
|
+
return Object.keys(table.columns);
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* Create TableColumnResolver function for SqlParamInjector
|
65
|
+
* @returns Function compatible with SqlParamInjector
|
66
|
+
*/
|
67
|
+
createTableColumnResolver() {
|
68
|
+
return (tableName) => this.getTableColumns(tableName);
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Generate JSON mapping configuration for PostgresJsonQueryBuilder
|
72
|
+
* @param rootTableName Root table for the JSON structure
|
73
|
+
* @returns JSON mapping configuration
|
74
|
+
*/
|
75
|
+
createJsonMapping(rootTableName) {
|
76
|
+
var _a;
|
77
|
+
const rootTable = this.schemas[rootTableName];
|
78
|
+
if (!rootTable) {
|
79
|
+
throw new Error(`Table '${rootTableName}' not found in schema registry`);
|
80
|
+
}
|
81
|
+
// Build root entity columns mapping
|
82
|
+
const rootColumns = {};
|
83
|
+
Object.entries(rootTable.columns).forEach(([columnName, column]) => {
|
84
|
+
rootColumns[columnName] = column.jsonAlias || column.name;
|
85
|
+
});
|
86
|
+
// Build nested entities from relationships
|
87
|
+
const nestedEntities = [];
|
88
|
+
(_a = rootTable.relationships) === null || _a === void 0 ? void 0 : _a.forEach(rel => {
|
89
|
+
const relatedTable = this.schemas[rel.table];
|
90
|
+
if (!relatedTable) {
|
91
|
+
throw new Error(`Related table '${rel.table}' not found in schema registry`);
|
92
|
+
}
|
93
|
+
// Build columns mapping for related table
|
94
|
+
const relatedColumns = {};
|
95
|
+
Object.entries(relatedTable.columns).forEach(([columnName, column]) => {
|
96
|
+
relatedColumns[columnName] = column.jsonAlias || column.name;
|
97
|
+
});
|
98
|
+
// Determine relationship type for JSON builder
|
99
|
+
const relationshipType = rel.type;
|
100
|
+
nestedEntities.push({
|
101
|
+
id: rel.propertyName,
|
102
|
+
name: relatedTable.displayName || rel.table,
|
103
|
+
parentId: rootTableName,
|
104
|
+
propertyName: rel.propertyName,
|
105
|
+
relationshipType: relationshipType,
|
106
|
+
columns: relatedColumns
|
107
|
+
});
|
108
|
+
});
|
109
|
+
return {
|
110
|
+
rootName: rootTableName,
|
111
|
+
rootEntity: {
|
112
|
+
id: rootTableName,
|
113
|
+
name: rootTable.displayName || rootTableName,
|
114
|
+
columns: rootColumns
|
115
|
+
},
|
116
|
+
nestedEntities,
|
117
|
+
useJsonb: true,
|
118
|
+
resultFormat: "single"
|
119
|
+
};
|
120
|
+
}
|
121
|
+
/**
|
122
|
+
* Get all table names in the schema
|
123
|
+
* @returns Array of table names
|
124
|
+
*/
|
125
|
+
getTableNames() {
|
126
|
+
return Object.keys(this.schemas);
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* Get table definition by name
|
130
|
+
* @param tableName Name of the table
|
131
|
+
* @returns Table definition or undefined
|
132
|
+
*/
|
133
|
+
getTable(tableName) {
|
134
|
+
return this.schemas[tableName];
|
135
|
+
}
|
136
|
+
/**
|
137
|
+
* Get primary key column name for a table
|
138
|
+
* Used by QueryBuilder.buildUpdateQuery for WHERE clause conditions
|
139
|
+
* @param tableName Name of the table
|
140
|
+
* @returns Primary key column name or undefined
|
141
|
+
*/
|
142
|
+
getPrimaryKey(tableName) {
|
143
|
+
const table = this.schemas[tableName];
|
144
|
+
if (!table)
|
145
|
+
return undefined;
|
146
|
+
const primaryKeyEntry = Object.entries(table.columns)
|
147
|
+
.find(([_, col]) => col.isPrimaryKey);
|
148
|
+
return primaryKeyEntry ? primaryKeyEntry[0] : undefined;
|
149
|
+
}
|
150
|
+
/**
|
151
|
+
* Get foreign key relationships for a table
|
152
|
+
* @param tableName Name of the table
|
153
|
+
* @returns Array of foreign key relationships
|
154
|
+
*/
|
155
|
+
getForeignKeys(tableName) {
|
156
|
+
const table = this.schemas[tableName];
|
157
|
+
if (!table)
|
158
|
+
return [];
|
159
|
+
const foreignKeys = [];
|
160
|
+
Object.entries(table.columns).forEach(([columnName, column]) => {
|
161
|
+
if (column.foreignKey) {
|
162
|
+
foreignKeys.push({
|
163
|
+
column: columnName,
|
164
|
+
referencedTable: column.foreignKey.table,
|
165
|
+
referencedColumn: column.foreignKey.column
|
166
|
+
});
|
167
|
+
}
|
168
|
+
});
|
169
|
+
return foreignKeys;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
exports.SchemaManager = SchemaManager;
|
173
|
+
// === Convenience Functions ===
|
174
|
+
/**
|
175
|
+
* Create a SchemaManager instance from schema definitions
|
176
|
+
* @param schemas Schema registry object
|
177
|
+
* @returns SchemaManager instance
|
178
|
+
*/
|
179
|
+
function createSchemaManager(schemas) {
|
180
|
+
return new SchemaManager(schemas);
|
181
|
+
}
|
182
|
+
/**
|
183
|
+
* Create TableColumnResolver function from schema definitions
|
184
|
+
* @param schemas Schema registry object
|
185
|
+
* @returns TableColumnResolver function for SqlParamInjector
|
186
|
+
*/
|
187
|
+
function createTableColumnResolver(schemas) {
|
188
|
+
const manager = new SchemaManager(schemas);
|
189
|
+
return manager.createTableColumnResolver();
|
190
|
+
}
|
191
|
+
/**
|
192
|
+
* Create JSON mapping from schema definitions
|
193
|
+
* @param schemas Schema registry object
|
194
|
+
* @param rootTableName Root table name
|
195
|
+
* @returns JSON mapping for PostgresJsonQueryBuilder
|
196
|
+
*/
|
197
|
+
function createJsonMappingFromSchema(schemas, rootTableName) {
|
198
|
+
const manager = new SchemaManager(schemas);
|
199
|
+
return manager.createJsonMapping(rootTableName);
|
200
|
+
}
|
201
|
+
//# sourceMappingURL=SchemaManager.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SchemaManager.js","sourceRoot":"","sources":["../../src/utils/SchemaManager.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA0PH,kDAEC;AAOD,8DAGC;AAQD,kEAGC;AAtND,+BAA+B;AAE/B;;;GAGG;AACH,MAAa,aAAa;IAGtB,YAAY,OAAuB;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACK,eAAe;QACnB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7C,MAAM,MAAM,GAAa,EAAE,CAAC;QAE5B,sBAAsB;QACtB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;;YACxD,yEAAyE;YACzE,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC;iBAC5C,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC;iBACtC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YAE9B,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC3B,MAAM,CAAC,IAAI,CAAC,UAAU,SAAS,8BAA8B,CAAC,CAAC;YACnE,CAAC;YAED,kCAAkC;YA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U,CAAC,MAAM;iBAC7C,CAAC,CAAC;YACP,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,CAAC;IACvB,CAAC;CACJ;AAhLD,sCAgLC;AAED,gCAAgC;AAEhC;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,OAAuB;IACvD,OAAO,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,SAAgB,yBAAyB,CAAC,OAAuB;IAC7D,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,yBAAyB,EAAE,CAAC;AAC/C,CAAC;AAED;;;;;GAKG;AACH,SAAgB,2BAA2B,CAAC,OAAuB,EAAE,aAAqB;IACtF,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "rawsql-ts",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.10.1-beta",
|
4
4
|
"description": "[beta]High-performance SQL parser and AST analyzer written in TypeScript. Provides fast parsing and advanced transformation capabilities.",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"module": "dist/esm/index.js",
|