oak-db 2.2.2 → 2.2.4

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.
@@ -1,105 +1,105 @@
1
- import { EntityDict, Q_FullTextValue, RefOrExpression, Ref, StorageSchema } from "oak-domain/lib/types";
2
- import { DataType } from "oak-domain/lib/types/schema/DataTypes";
3
- import { SqlOperateOption, SqlSelectOption, SqlTranslator } from "../sqlTranslator";
4
- export interface MySqlSelectOption extends SqlSelectOption {
5
- }
6
- export interface MysqlOperateOption extends SqlOperateOption {
7
- }
8
- export declare class MySqlTranslator<ED extends EntityDict> extends SqlTranslator<ED> {
9
- protected getDefaultSelectFilter(alias: string, option?: MySqlSelectOption): string;
10
- private makeUpSchema;
11
- constructor(schema: StorageSchema<ED>);
12
- static supportedDataTypes: DataType[];
13
- static spatialTypes: DataType[];
14
- static withLengthDataTypes: DataType[];
15
- static withPrecisionDataTypes: DataType[];
16
- static withScaleDataTypes: DataType[];
17
- static unsignedAndZerofillTypes: DataType[];
18
- static withWidthDataTypes: DataType[];
19
- static dataTypeDefaults: {
20
- varchar: {
21
- length: number;
22
- };
23
- nvarchar: {
24
- length: number;
25
- };
26
- "national varchar": {
27
- length: number;
28
- };
29
- char: {
30
- length: number;
31
- };
32
- binary: {
33
- length: number;
34
- };
35
- varbinary: {
36
- length: number;
37
- };
38
- decimal: {
39
- precision: number;
40
- scale: number;
41
- };
42
- dec: {
43
- precision: number;
44
- scale: number;
45
- };
46
- numeric: {
47
- precision: number;
48
- scale: number;
49
- };
50
- fixed: {
51
- precision: number;
52
- scale: number;
53
- };
54
- float: {
55
- precision: number;
56
- };
57
- double: {
58
- precision: number;
59
- };
60
- time: {
61
- precision: number;
62
- };
63
- datetime: {
64
- precision: number;
65
- };
66
- timestamp: {
67
- precision: number;
68
- };
69
- bit: {
70
- width: number;
71
- };
72
- int: {
73
- width: number;
74
- };
75
- integer: {
76
- width: number;
77
- };
78
- tinyint: {
79
- width: number;
80
- };
81
- smallint: {
82
- width: number;
83
- };
84
- mediumint: {
85
- width: number;
86
- };
87
- bigint: {
88
- width: number;
89
- };
90
- };
91
- maxAliasLength: number;
92
- private populateDataTypeDef;
93
- protected translateAttrProjection(dataType: DataType, alias: string, attr: string): string;
94
- protected translateAttrValue(dataType: DataType | Ref, value: any): string;
95
- protected translateFullTextSearch<T extends keyof ED>(value: Q_FullTextValue, entity: T, alias: string): string;
96
- translateCreateEntity<T extends keyof ED>(entity: T, options?: {
97
- replace?: boolean;
98
- }): string[];
99
- private translateFnName;
100
- private translateAttrInExpression;
101
- protected translateExpression<T extends keyof ED>(entity: T, alias: string, expression: RefOrExpression<keyof ED[T]["OpSchema"]>, refDict: Record<string, [string, keyof ED]>): string;
102
- protected populateSelectStmt<T extends keyof ED>(projectionText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, groupByText?: string, indexFrom?: number, count?: number, option?: MySqlSelectOption): string;
103
- protected populateUpdateStmt(updateText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, indexFrom?: number, count?: number, option?: MysqlOperateOption): string;
104
- protected populateRemoveStmt(removeText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, indexFrom?: number, count?: number, option?: MysqlOperateOption): string;
105
- }
1
+ import { EntityDict, Q_FullTextValue, RefOrExpression, Ref, StorageSchema } from "oak-domain/lib/types";
2
+ import { DataType } from "oak-domain/lib/types/schema/DataTypes";
3
+ import { SqlOperateOption, SqlSelectOption, SqlTranslator } from "../sqlTranslator";
4
+ export interface MySqlSelectOption extends SqlSelectOption {
5
+ }
6
+ export interface MysqlOperateOption extends SqlOperateOption {
7
+ }
8
+ export declare class MySqlTranslator<ED extends EntityDict> extends SqlTranslator<ED> {
9
+ protected getDefaultSelectFilter(alias: string, option?: MySqlSelectOption): string;
10
+ private makeUpSchema;
11
+ constructor(schema: StorageSchema<ED>);
12
+ static supportedDataTypes: DataType[];
13
+ static spatialTypes: DataType[];
14
+ static withLengthDataTypes: DataType[];
15
+ static withPrecisionDataTypes: DataType[];
16
+ static withScaleDataTypes: DataType[];
17
+ static unsignedAndZerofillTypes: DataType[];
18
+ static withWidthDataTypes: DataType[];
19
+ static dataTypeDefaults: {
20
+ varchar: {
21
+ length: number;
22
+ };
23
+ nvarchar: {
24
+ length: number;
25
+ };
26
+ "national varchar": {
27
+ length: number;
28
+ };
29
+ char: {
30
+ length: number;
31
+ };
32
+ binary: {
33
+ length: number;
34
+ };
35
+ varbinary: {
36
+ length: number;
37
+ };
38
+ decimal: {
39
+ precision: number;
40
+ scale: number;
41
+ };
42
+ dec: {
43
+ precision: number;
44
+ scale: number;
45
+ };
46
+ numeric: {
47
+ precision: number;
48
+ scale: number;
49
+ };
50
+ fixed: {
51
+ precision: number;
52
+ scale: number;
53
+ };
54
+ float: {
55
+ precision: number;
56
+ };
57
+ double: {
58
+ precision: number;
59
+ };
60
+ time: {
61
+ precision: number;
62
+ };
63
+ datetime: {
64
+ precision: number;
65
+ };
66
+ timestamp: {
67
+ precision: number;
68
+ };
69
+ bit: {
70
+ width: number;
71
+ };
72
+ int: {
73
+ width: number;
74
+ };
75
+ integer: {
76
+ width: number;
77
+ };
78
+ tinyint: {
79
+ width: number;
80
+ };
81
+ smallint: {
82
+ width: number;
83
+ };
84
+ mediumint: {
85
+ width: number;
86
+ };
87
+ bigint: {
88
+ width: number;
89
+ };
90
+ };
91
+ maxAliasLength: number;
92
+ private populateDataTypeDef;
93
+ protected translateAttrProjection(dataType: DataType, alias: string, attr: string): string;
94
+ protected translateAttrValue(dataType: DataType | Ref, value: any): string;
95
+ protected translateFullTextSearch<T extends keyof ED>(value: Q_FullTextValue, entity: T, alias: string): string;
96
+ translateCreateEntity<T extends keyof ED>(entity: T, options?: {
97
+ replace?: boolean;
98
+ }): string[];
99
+ private translateFnName;
100
+ private translateAttrInExpression;
101
+ protected translateExpression<T extends keyof ED>(entity: T, alias: string, expression: RefOrExpression<keyof ED[T]["OpSchema"]>, refDict: Record<string, [string, keyof ED]>): string;
102
+ protected populateSelectStmt<T extends keyof ED>(projectionText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, groupByText?: string, indexFrom?: number, count?: number, option?: MySqlSelectOption): string;
103
+ protected populateUpdateStmt(updateText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, indexFrom?: number, count?: number, option?: MysqlOperateOption): string;
104
+ protected populateRemoveStmt(removeText: string, fromText: string, aliasDict: Record<string, string>, filterText: string, sorterText?: string, indexFrom?: number, count?: number, option?: MysqlOperateOption): string;
105
+ }