rawsql-ts 0.10.4-beta → 0.10.5-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.
@@ -0,0 +1,35 @@
1
+ import { SimpleSelectQuery } from "../models/SelectQuery";
2
+ /**
3
+ * Options for pagination injection
4
+ */
5
+ export interface PaginationOptions {
6
+ /** Page number (1-based) */
7
+ page: number;
8
+ /** Number of items per page */
9
+ pageSize: number;
10
+ }
11
+ /**
12
+ * SqlPaginationInjector injects pagination (LIMIT/OFFSET) into a SelectQuery model,
13
+ * creating LIMIT and OFFSET clauses based on provided pagination options.
14
+ */
15
+ export declare class SqlPaginationInjector {
16
+ /**
17
+ * Injects pagination as LIMIT/OFFSET clauses into the given query model.
18
+ * @param query The SelectQuery to modify
19
+ * @param pagination Pagination options containing page number and page size
20
+ * @returns The modified SimpleSelectQuery with pagination applied
21
+ */
22
+ inject(query: SimpleSelectQuery | string, pagination: PaginationOptions): SimpleSelectQuery;
23
+ /**
24
+ * Removes LIMIT and OFFSET clauses from the given query.
25
+ * @param query The SelectQuery to modify
26
+ * @returns The modified SimpleSelectQuery with pagination removed
27
+ */
28
+ static removePagination(query: SimpleSelectQuery | string): SimpleSelectQuery;
29
+ /**
30
+ * Validates pagination options
31
+ * @param pagination Pagination options to validate
32
+ * @throws Error if validation fails
33
+ */
34
+ private validatePaginationOptions;
35
+ }
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SqlPaginationInjector = void 0;
4
+ const SelectQuery_1 = require("../models/SelectQuery");
5
+ const Clause_1 = require("../models/Clause");
6
+ const ValueComponent_1 = require("../models/ValueComponent");
7
+ const SelectQueryParser_1 = require("../parsers/SelectQueryParser");
8
+ /**
9
+ * SqlPaginationInjector injects pagination (LIMIT/OFFSET) into a SelectQuery model,
10
+ * creating LIMIT and OFFSET clauses based on provided pagination options.
11
+ */
12
+ class SqlPaginationInjector {
13
+ /**
14
+ * Injects pagination as LIMIT/OFFSET clauses into the given query model.
15
+ * @param query The SelectQuery to modify
16
+ * @param pagination Pagination options containing page number and page size
17
+ * @returns The modified SimpleSelectQuery with pagination applied
18
+ */
19
+ inject(query, pagination) {
20
+ // Validate pagination options
21
+ this.validatePaginationOptions(pagination);
22
+ // Convert string query to SimpleSelectQuery using SelectQueryParser if needed
23
+ if (typeof query === 'string') {
24
+ query = SelectQueryParser_1.SelectQueryParser.parse(query);
25
+ }
26
+ // Check if query is SimpleSelectQuery
27
+ if (!(query instanceof SelectQuery_1.SimpleSelectQuery)) {
28
+ throw new Error('Complex queries are not supported for pagination');
29
+ }
30
+ // Check if query already has LIMIT or OFFSET clauses
31
+ if (query.limitClause || query.offsetClause) {
32
+ throw new Error('Query already contains LIMIT or OFFSET clause. Use removePagination() first if you want to override existing pagination.');
33
+ }
34
+ // Calculate offset
35
+ const offset = (pagination.page - 1) * pagination.pageSize;
36
+ // Create LIMIT clause
37
+ const limitClause = new Clause_1.LimitClause(new ValueComponent_1.LiteralValue(pagination.pageSize));
38
+ // Create OFFSET clause (only if offset > 0)
39
+ const offsetClause = offset > 0 ? new Clause_1.OffsetClause(new ValueComponent_1.LiteralValue(offset)) : null;
40
+ // Create a new query with pagination clauses
41
+ return new SelectQuery_1.SimpleSelectQuery({
42
+ withClause: query.withClause,
43
+ selectClause: query.selectClause,
44
+ fromClause: query.fromClause,
45
+ whereClause: query.whereClause,
46
+ groupByClause: query.groupByClause,
47
+ havingClause: query.havingClause,
48
+ orderByClause: query.orderByClause,
49
+ windowClause: query.windowClause,
50
+ limitClause: limitClause,
51
+ offsetClause: offsetClause,
52
+ fetchClause: query.fetchClause,
53
+ forClause: query.forClause,
54
+ });
55
+ }
56
+ /**
57
+ * Removes LIMIT and OFFSET clauses from the given query.
58
+ * @param query The SelectQuery to modify
59
+ * @returns The modified SimpleSelectQuery with pagination removed
60
+ */
61
+ static removePagination(query) {
62
+ // Convert string query to SimpleSelectQuery using SelectQueryParser if needed
63
+ if (typeof query === 'string') {
64
+ query = SelectQueryParser_1.SelectQueryParser.parse(query);
65
+ }
66
+ // Check if query is SimpleSelectQuery
67
+ if (!(query instanceof SelectQuery_1.SimpleSelectQuery)) {
68
+ throw new Error('Complex queries are not supported for pagination removal');
69
+ }
70
+ // Create a new query without LIMIT and OFFSET clauses
71
+ return new SelectQuery_1.SimpleSelectQuery({
72
+ withClause: query.withClause,
73
+ selectClause: query.selectClause,
74
+ fromClause: query.fromClause,
75
+ whereClause: query.whereClause,
76
+ groupByClause: query.groupByClause,
77
+ havingClause: query.havingClause,
78
+ orderByClause: query.orderByClause,
79
+ windowClause: query.windowClause,
80
+ limitClause: null, // Remove LIMIT
81
+ offsetClause: null, // Remove OFFSET
82
+ fetchClause: query.fetchClause,
83
+ forClause: query.forClause,
84
+ });
85
+ }
86
+ /**
87
+ * Validates pagination options
88
+ * @param pagination Pagination options to validate
89
+ * @throws Error if validation fails
90
+ */
91
+ validatePaginationOptions(pagination) {
92
+ if (!pagination) {
93
+ throw new Error('Pagination options are required');
94
+ }
95
+ if (typeof pagination.page !== 'number' || pagination.page < 1) {
96
+ throw new Error('Page number must be a positive integer (1 or greater)');
97
+ }
98
+ if (typeof pagination.pageSize !== 'number' || pagination.pageSize < 1) {
99
+ throw new Error('Page size must be a positive integer (1 or greater)');
100
+ }
101
+ // Optional: Set reasonable upper limit for page size to prevent performance issues
102
+ if (pagination.pageSize > 1000) {
103
+ throw new Error('Page size cannot exceed 1000 items');
104
+ }
105
+ }
106
+ }
107
+ exports.SqlPaginationInjector = SqlPaginationInjector;
108
+ //# sourceMappingURL=SqlPaginationInjector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqlPaginationInjector.js","sourceRoot":"","sources":["../../src/transformers/SqlPaginationInjector.ts"],"names":[],"mappings":";;;AAAA,uDAAuE;AACvE,6CAA6D;AAC7D,6DAAwD;AACxD,oEAAiE;AAYjE;;;GAGG;AACH,MAAa,qBAAqB;IAE9B;;;;;OAKG;IACI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C,IAAI,GAAG,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC7E,CAAC;QAED,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,QAAQ,IAAI,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;YACrE,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QAC3E,CAAC;QAED,mFAAmF;QACnF,IAAI,UAAU,CAAC,QAAQ,GAAG,IAAI,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;CACJ;AApHD,sDAoHC"}
@@ -0,0 +1,36 @@
1
+ import { SimpleSelectQuery } from "../models/SelectQuery";
2
+ /**
3
+ * SqlSortInjector injects sort conditions into a SelectQuery model,
4
+ * creating ORDER BY clauses based on provided sort conditions.
5
+ */
6
+ export declare class SqlSortInjector {
7
+ private tableColumnResolver?;
8
+ constructor(tableColumnResolver?: (tableName: string) => string[]);
9
+ /**
10
+ * Removes ORDER BY clause from the given query.
11
+ * @param query The SelectQuery to modify
12
+ * @returns The modified SimpleSelectQuery with ORDER BY clause removed
13
+ */
14
+ static removeOrderBy(query: SimpleSelectQuery | string): SimpleSelectQuery;
15
+ /**
16
+ * Injects sort conditions as ORDER BY clauses into the given query model.
17
+ * Appends to existing ORDER BY clause if present.
18
+ * @param query The SelectQuery to modify
19
+ * @param sortConditions A record of column names and sort conditions
20
+ * @returns The modified SimpleSelectQuery
21
+ */
22
+ inject(query: SimpleSelectQuery | string, sortConditions: SortConditions): SimpleSelectQuery;
23
+ /**
24
+ * Validates sort condition for a column
25
+ */
26
+ private validateSortCondition;
27
+ }
28
+ export type SortCondition = {
29
+ asc?: boolean;
30
+ desc?: boolean;
31
+ nullsFirst?: boolean;
32
+ nullsLast?: boolean;
33
+ };
34
+ export type SortConditions = {
35
+ [columnName: string]: SortCondition;
36
+ };
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SqlSortInjector = void 0;
4
+ const SelectQuery_1 = require("../models/SelectQuery");
5
+ const SelectableColumnCollector_1 = require("./SelectableColumnCollector");
6
+ const Clause_1 = require("../models/Clause");
7
+ const SelectQueryParser_1 = require("../parsers/SelectQueryParser");
8
+ /**
9
+ * SqlSortInjector injects sort conditions into a SelectQuery model,
10
+ * creating ORDER BY clauses based on provided sort conditions.
11
+ */
12
+ class SqlSortInjector {
13
+ constructor(tableColumnResolver) {
14
+ this.tableColumnResolver = tableColumnResolver;
15
+ }
16
+ /**
17
+ * Removes ORDER BY clause from the given query.
18
+ * @param query The SelectQuery to modify
19
+ * @returns The modified SimpleSelectQuery with ORDER BY clause removed
20
+ */
21
+ static removeOrderBy(query) {
22
+ // Convert string query to SimpleSelectQuery using SelectQueryParser if needed
23
+ if (typeof query === 'string') {
24
+ query = SelectQueryParser_1.SelectQueryParser.parse(query);
25
+ }
26
+ // Check if query is SimpleSelectQuery
27
+ if (!(query instanceof SelectQuery_1.SimpleSelectQuery)) {
28
+ throw new Error('Complex queries are not supported for ORDER BY removal');
29
+ }
30
+ // Create a new query without ORDER BY clause
31
+ return new SelectQuery_1.SimpleSelectQuery({
32
+ withClause: query.withClause,
33
+ selectClause: query.selectClause,
34
+ fromClause: query.fromClause,
35
+ whereClause: query.whereClause,
36
+ groupByClause: query.groupByClause,
37
+ havingClause: query.havingClause,
38
+ orderByClause: null, // Remove ORDER BY
39
+ windowClause: query.windowClause,
40
+ limitClause: query.limitClause,
41
+ offsetClause: query.offsetClause,
42
+ fetchClause: query.fetchClause,
43
+ forClause: query.forClause,
44
+ });
45
+ }
46
+ /**
47
+ * Injects sort conditions as ORDER BY clauses into the given query model.
48
+ * Appends to existing ORDER BY clause if present.
49
+ * @param query The SelectQuery to modify
50
+ * @param sortConditions A record of column names and sort conditions
51
+ * @returns The modified SimpleSelectQuery
52
+ */
53
+ inject(query, sortConditions) {
54
+ // Convert string query to SimpleSelectQuery using SelectQueryParser if needed
55
+ if (typeof query === 'string') {
56
+ query = SelectQueryParser_1.SelectQueryParser.parse(query);
57
+ }
58
+ // Check if query is SimpleSelectQuery
59
+ if (!(query instanceof SelectQuery_1.SimpleSelectQuery)) {
60
+ throw new Error('Complex queries are not supported for sorting');
61
+ }
62
+ // Collect available columns from the current query only (no upstream search)
63
+ const collector = new SelectableColumnCollector_1.SelectableColumnCollector(this.tableColumnResolver);
64
+ const availableColumns = collector.collect(query);
65
+ // Validate that all specified columns exist
66
+ for (const columnName of Object.keys(sortConditions)) {
67
+ const columnEntry = availableColumns.find(item => item.name === columnName);
68
+ if (!columnEntry) {
69
+ throw new Error(`Column or alias '${columnName}' not found in current query`);
70
+ }
71
+ }
72
+ // Build new ORDER BY items
73
+ const newOrderByItems = [];
74
+ for (const [columnName, condition] of Object.entries(sortConditions)) {
75
+ const columnEntry = availableColumns.find(item => item.name === columnName);
76
+ if (!columnEntry)
77
+ continue; // Should not happen due to validation above
78
+ const columnRef = columnEntry.value;
79
+ // Validate condition
80
+ this.validateSortCondition(columnName, condition);
81
+ // Determine sort direction
82
+ let sortDirection;
83
+ if (condition.desc) {
84
+ sortDirection = Clause_1.SortDirection.Descending;
85
+ }
86
+ else {
87
+ sortDirection = Clause_1.SortDirection.Ascending; // Default to ASC
88
+ }
89
+ // Determine nulls position
90
+ let nullsPosition = null;
91
+ if (condition.nullsFirst) {
92
+ nullsPosition = Clause_1.NullsSortDirection.First;
93
+ }
94
+ else if (condition.nullsLast) {
95
+ nullsPosition = Clause_1.NullsSortDirection.Last;
96
+ }
97
+ // Create OrderByItem
98
+ const orderByItem = new Clause_1.OrderByItem(columnRef, sortDirection, nullsPosition);
99
+ newOrderByItems.push(orderByItem);
100
+ }
101
+ // Combine with existing ORDER BY clause if present
102
+ let finalOrderByItems = [];
103
+ if (query.orderByClause) {
104
+ // Append to existing ORDER BY
105
+ finalOrderByItems = [...query.orderByClause.order, ...newOrderByItems];
106
+ }
107
+ else {
108
+ // Create new ORDER BY
109
+ finalOrderByItems = newOrderByItems;
110
+ }
111
+ // Create new OrderByClause
112
+ const newOrderByClause = finalOrderByItems.length > 0
113
+ ? new Clause_1.OrderByClause(finalOrderByItems)
114
+ : null;
115
+ // Create new query with updated ORDER BY clause
116
+ return new SelectQuery_1.SimpleSelectQuery({
117
+ withClause: query.withClause,
118
+ selectClause: query.selectClause,
119
+ fromClause: query.fromClause,
120
+ whereClause: query.whereClause,
121
+ groupByClause: query.groupByClause,
122
+ havingClause: query.havingClause,
123
+ orderByClause: newOrderByClause,
124
+ windowClause: query.windowClause,
125
+ limitClause: query.limitClause,
126
+ offsetClause: query.offsetClause,
127
+ fetchClause: query.fetchClause,
128
+ forClause: query.forClause,
129
+ });
130
+ }
131
+ /**
132
+ * Validates sort condition for a column
133
+ */
134
+ validateSortCondition(columnName, condition) {
135
+ // Check for conflicting sort directions
136
+ if (condition.asc && condition.desc) {
137
+ throw new Error(`Conflicting sort directions for column '${columnName}': both asc and desc specified`);
138
+ }
139
+ // Check for conflicting nulls positions
140
+ if (condition.nullsFirst && condition.nullsLast) {
141
+ throw new Error(`Conflicting nulls positions for column '${columnName}': both nullsFirst and nullsLast specified`);
142
+ }
143
+ // Check if at least one option is specified
144
+ if (!condition.asc && !condition.desc && !condition.nullsFirst && !condition.nullsLast) {
145
+ throw new Error(`Empty sort condition for column '${columnName}': at least one sort option must be specified`);
146
+ }
147
+ }
148
+ }
149
+ exports.SqlSortInjector = SqlSortInjector;
150
+ //# sourceMappingURL=SqlSortInjector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SqlSortInjector.js","sourceRoot":"","sources":["../../src/transformers/SqlSortInjector.ts"],"names":[],"mappings":";;;AAAA,uDAAuE;AACvE,2EAAwE;AACxE,6CAAiG;AAEjG,oEAAiE;AAEjE;;;GAGG;AACH,MAAa,eAAe;IAGxB,YAAY,mBAAqD;QAC7D,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;IACnD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C,SAAS;SAC7B,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,UAAkB,EAAE,SAAwB;QACtE,wCAAwC;QACxC,IAAI,SAAS,CAAC,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,2CAA2C,UAAU,gCAAgC,CAAC,CAAC;QAC3G,CAAC;QAED,wCAAwC;QACxC,IAAI,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,SAAS,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CAAC,2CAA2C,UAAU,4CAA4C,CAAC,CAAC;QACvH,CAAC;QAED,4CAA4C;QAC5C,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,CAAC;YACrF,MAAM,IAAI,KAAK,CAAC,oCAAoC,UAAU,+CAA+C,CAAC,CAAC;QACnH,CAAC;IACL,CAAC;CACJ;AA9JD,0CA8JC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rawsql-ts",
3
- "version": "0.10.4-beta",
3
+ "version": "0.10.5-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",