@ragestudio/scylla-odm 0.22.2 → 0.22.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.
- package/batch/index.d.ts +3 -3
- package/batch/index.d.ts.map +1 -1
- package/client.d.ts +6 -5
- package/client.d.ts.map +1 -1
- package/client.js +11 -12
- package/client.js.map +1 -1
- package/cql_gen/create_table.d.ts +1 -1
- package/cql_gen/create_table.d.ts.map +1 -1
- package/document/index.d.ts +3 -3
- package/document/index.d.ts.map +1 -1
- package/driver/LICENSE.txt +177 -0
- package/driver/NOTICE.txt +67 -0
- package/driver/auth/index.d.ts +37 -0
- package/driver/auth/index.js +37 -0
- package/driver/auth/no-auth-provider.js +73 -0
- package/driver/auth/plain-text-auth-provider.js +81 -0
- package/driver/auth/provider.js +77 -0
- package/driver/client-options.js +442 -0
- package/driver/client.js +1267 -0
- package/driver/concurrent/index.d.ts +49 -0
- package/driver/concurrent/index.js +366 -0
- package/driver/connection.js +1034 -0
- package/driver/control-connection.js +1282 -0
- package/driver/encoder.js +2316 -0
- package/driver/errors.js +223 -0
- package/driver/execution-options.js +612 -0
- package/driver/execution-profile.js +274 -0
- package/driver/host-connection-pool.js +587 -0
- package/driver/host.js +699 -0
- package/driver/index.d.ts +387 -0
- package/driver/index.js +81 -0
- package/driver/mapping/cache.js +214 -0
- package/driver/mapping/doc-info-adapter.js +171 -0
- package/driver/mapping/index.d.ts +219 -0
- package/driver/mapping/index.js +57 -0
- package/driver/mapping/mapper.js +225 -0
- package/driver/mapping/mapping-handler.js +641 -0
- package/driver/mapping/model-batch-item.js +215 -0
- package/driver/mapping/model-batch-mapper.js +141 -0
- package/driver/mapping/model-mapper.js +315 -0
- package/driver/mapping/model-mapping-info.js +225 -0
- package/driver/mapping/object-selector.js +417 -0
- package/driver/mapping/q.js +156 -0
- package/driver/mapping/query-generator.js +556 -0
- package/driver/mapping/result-mapper.js +123 -0
- package/driver/mapping/result.js +139 -0
- package/driver/mapping/table-mappings.js +133 -0
- package/driver/mapping/tree.js +160 -0
- package/driver/metadata/aggregate.js +79 -0
- package/driver/metadata/client-state.js +119 -0
- package/driver/metadata/data-collection.js +182 -0
- package/driver/metadata/event-debouncer.js +174 -0
- package/driver/metadata/index.d.ts +276 -0
- package/driver/metadata/index.js +1156 -0
- package/driver/metadata/materialized-view.js +49 -0
- package/driver/metadata/schema-function.js +98 -0
- package/driver/metadata/schema-index.js +166 -0
- package/driver/metadata/schema-parser.js +1399 -0
- package/driver/metadata/table-metadata.js +77 -0
- package/driver/operation-state.js +206 -0
- package/driver/policies/address-resolution.js +145 -0
- package/driver/policies/index.d.ts +241 -0
- package/driver/policies/index.js +110 -0
- package/driver/policies/load-balancing.js +970 -0
- package/driver/policies/reconnection.js +166 -0
- package/driver/policies/retry.js +326 -0
- package/driver/policies/speculative-execution.js +150 -0
- package/driver/policies/timestamp-generation.js +176 -0
- package/driver/prepare-handler.js +347 -0
- package/driver/promise-utils.js +191 -0
- package/driver/readers.js +624 -0
- package/driver/request-execution.js +644 -0
- package/driver/request-handler.js +332 -0
- package/driver/requests.js +618 -0
- package/driver/stream-id-stack.js +209 -0
- package/driver/streams.js +745 -0
- package/driver/token.js +325 -0
- package/driver/tokenizer.js +631 -0
- package/driver/types/big-decimal.js +282 -0
- package/driver/types/duration.js +576 -0
- package/driver/types/index.d.ts +486 -0
- package/driver/types/index.js +733 -0
- package/driver/types/inet-address.js +262 -0
- package/driver/types/integer.js +818 -0
- package/driver/types/local-date.js +280 -0
- package/driver/types/local-time.js +299 -0
- package/driver/types/mutable-long.js +385 -0
- package/driver/types/protocol-version.js +391 -0
- package/driver/types/result-set.js +287 -0
- package/driver/types/result-stream.js +164 -0
- package/driver/types/row.js +85 -0
- package/driver/types/time-uuid.js +414 -0
- package/driver/types/tuple.js +103 -0
- package/driver/types/uuid.js +160 -0
- package/driver/types/vector.js +130 -0
- package/driver/types/version-number.js +153 -0
- package/driver/utils.js +1485 -0
- package/driver/writers.js +350 -0
- package/global.d.ts +1 -1
- package/global.d.ts.map +1 -1
- package/index.d.ts +6 -6
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/migrate/index.d.ts +1 -1
- package/migrate/index.d.ts.map +1 -1
- package/migrate/index.js +1 -1
- package/migrate/index.js.map +1 -1
- package/model/index.d.ts +6 -6
- package/model/index.d.ts.map +1 -1
- package/model/index.js +10 -10
- package/model/index.js.map +1 -1
- package/operations/countAll.d.ts +1 -1
- package/operations/countAll.d.ts.map +1 -1
- package/operations/delete.d.ts +3 -4
- package/operations/delete.d.ts.map +1 -1
- package/operations/delete.js +1 -1
- package/operations/delete.js.map +1 -1
- package/operations/find.d.ts +2 -2
- package/operations/find.d.ts.map +1 -1
- package/operations/find.js +1 -1
- package/operations/find.js.map +1 -1
- package/operations/findOne.d.ts +2 -2
- package/operations/findOne.d.ts.map +1 -1
- package/operations/findOne.js +1 -1
- package/operations/findOne.js.map +1 -1
- package/operations/insert.d.ts +3 -3
- package/operations/insert.d.ts.map +1 -1
- package/operations/insert.js +2 -2
- package/operations/insert.js.map +1 -1
- package/operations/sync.d.ts +1 -1
- package/operations/sync.d.ts.map +1 -1
- package/operations/sync.js +1 -1
- package/operations/sync.js.map +1 -1
- package/operations/tableExists.d.ts +1 -1
- package/operations/tableExists.d.ts.map +1 -1
- package/operations/update.d.ts +3 -3
- package/operations/update.d.ts.map +1 -1
- package/operations/update.js +2 -2
- package/operations/update.js.map +1 -1
- package/package.json +4 -12
- package/schema/index.d.ts +1 -1
- package/schema/index.d.ts.map +1 -1
- package/types.d.ts +4 -4
- package/types.d.ts.map +1 -1
- package/utils/queryParser.d.ts +1 -1
- package/utils/queryParser.d.ts.map +1 -1
- package/utils/queryParser.js +1 -1
- package/utils/queryParser.js.map +1 -1
- package/utils/typeChecker.d.ts +1 -1
- package/utils/typeChecker.d.ts.map +1 -1
- package/utils/typeChecker.js +1 -1
- package/utils/typeChecker.js.map +1 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
* or more contributor license agreements. See the NOTICE file
|
|
4
|
+
* distributed with this work for additional information
|
|
5
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
* to you under the Apache License, Version 2.0 (the
|
|
7
|
+
* "License"); you may not use this file except in compliance
|
|
8
|
+
* with the License. You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { types } from "../types"
|
|
20
|
+
import { EmptyCallback, Host, token, ValueCallback } from ".."
|
|
21
|
+
import dataTypes = types.dataTypes
|
|
22
|
+
import Uuid = types.Uuid
|
|
23
|
+
import InetAddress = types.InetAddress
|
|
24
|
+
|
|
25
|
+
export namespace metadata {
|
|
26
|
+
interface Aggregate {
|
|
27
|
+
argumentTypes: Array<{ code: dataTypes; info: any }>
|
|
28
|
+
finalFunction: string
|
|
29
|
+
initCondition: string
|
|
30
|
+
keyspaceName: string
|
|
31
|
+
returnType: string
|
|
32
|
+
signature: string[]
|
|
33
|
+
stateFunction: string
|
|
34
|
+
stateType: string
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface ClientState {
|
|
38
|
+
getConnectedHosts(): Host[]
|
|
39
|
+
|
|
40
|
+
getInFlightQueries(host: Host): number
|
|
41
|
+
|
|
42
|
+
getOpenConnections(host: Host): number
|
|
43
|
+
|
|
44
|
+
toString(): string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
interface DataTypeInfo {
|
|
48
|
+
code: dataTypes
|
|
49
|
+
info: string | DataTypeInfo | DataTypeInfo[]
|
|
50
|
+
options: {
|
|
51
|
+
frozen: boolean
|
|
52
|
+
reversed: boolean
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface ColumnInfo {
|
|
57
|
+
name: string
|
|
58
|
+
type: DataTypeInfo
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
enum IndexKind {
|
|
62
|
+
custom = 0,
|
|
63
|
+
keys,
|
|
64
|
+
composites,
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
interface Index {
|
|
68
|
+
kind: IndexKind
|
|
69
|
+
name: string
|
|
70
|
+
options: object
|
|
71
|
+
target: string
|
|
72
|
+
|
|
73
|
+
isCompositesKind(): boolean
|
|
74
|
+
|
|
75
|
+
isCustomKind(): boolean
|
|
76
|
+
|
|
77
|
+
isKeysKind(): boolean
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
interface DataCollection {
|
|
81
|
+
bloomFilterFalsePositiveChance: number
|
|
82
|
+
caching: string
|
|
83
|
+
clusteringKeys: ColumnInfo[]
|
|
84
|
+
clusteringOrder: string[]
|
|
85
|
+
columns: ColumnInfo[]
|
|
86
|
+
columnsByName: { [key: string]: ColumnInfo }
|
|
87
|
+
comment: string
|
|
88
|
+
compactionClass: string
|
|
89
|
+
compactionOptions: { [option: string]: any }
|
|
90
|
+
compression: {
|
|
91
|
+
class?: string
|
|
92
|
+
[option: string]: any
|
|
93
|
+
}
|
|
94
|
+
crcCheckChange?: number
|
|
95
|
+
defaultTtl: number
|
|
96
|
+
extensions: { [option: string]: any }
|
|
97
|
+
gcGraceSeconds: number
|
|
98
|
+
localReadRepairChance: number
|
|
99
|
+
maxIndexInterval?: number
|
|
100
|
+
minIndexInterval?: number
|
|
101
|
+
name: string
|
|
102
|
+
partitionKeys: ColumnInfo[]
|
|
103
|
+
populateCacheOnFlush: boolean
|
|
104
|
+
readRepairChance: number
|
|
105
|
+
speculativeRetry: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface MaterializedView extends DataCollection {
|
|
109
|
+
tableName: string
|
|
110
|
+
whereClause: string
|
|
111
|
+
includeAllColumns: boolean
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
interface TableMetadata extends DataCollection {
|
|
115
|
+
indexes: Index[]
|
|
116
|
+
indexInterval?: number
|
|
117
|
+
isCompact: boolean
|
|
118
|
+
memtableFlushPeriod: number
|
|
119
|
+
replicateOnWrite: boolean
|
|
120
|
+
cdc?: boolean
|
|
121
|
+
virtual: boolean
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
interface QueryTrace {
|
|
125
|
+
requestType: string
|
|
126
|
+
coordinator: InetAddress
|
|
127
|
+
parameters: { [key: string]: any }
|
|
128
|
+
startedAt: number | types.Long
|
|
129
|
+
duration: number
|
|
130
|
+
clientAddress: string
|
|
131
|
+
events: Array<{
|
|
132
|
+
id: Uuid
|
|
133
|
+
activity: any
|
|
134
|
+
source: any
|
|
135
|
+
elapsed: any
|
|
136
|
+
thread: any
|
|
137
|
+
}>
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
interface SchemaFunction {
|
|
141
|
+
argumentNames: string[]
|
|
142
|
+
argumentTypes: Array<{ code: dataTypes; info: any }>
|
|
143
|
+
body: string
|
|
144
|
+
calledOnNullInput: boolean
|
|
145
|
+
keyspaceName: string
|
|
146
|
+
language: string
|
|
147
|
+
name: string
|
|
148
|
+
returnType: string
|
|
149
|
+
signature: string[]
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
interface Udt {
|
|
153
|
+
name: string
|
|
154
|
+
fields: ColumnInfo[]
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
interface Metadata {
|
|
158
|
+
keyspaces: { [name: string]: { name: string; strategy: string } }
|
|
159
|
+
|
|
160
|
+
clearPrepared(): void
|
|
161
|
+
|
|
162
|
+
getAggregate(
|
|
163
|
+
keyspaceName: string,
|
|
164
|
+
name: string,
|
|
165
|
+
signature: string[] | Array<{ code: number; info: any }>,
|
|
166
|
+
callback: ValueCallback<Aggregate>,
|
|
167
|
+
): void
|
|
168
|
+
|
|
169
|
+
getAggregate(
|
|
170
|
+
keyspaceName: string,
|
|
171
|
+
name: string,
|
|
172
|
+
signature: string[] | Array<{ code: number; info: any }>,
|
|
173
|
+
): Promise<Aggregate>
|
|
174
|
+
|
|
175
|
+
getAggregates(
|
|
176
|
+
keyspaceName: string,
|
|
177
|
+
name: string,
|
|
178
|
+
callback: ValueCallback<Aggregate[]>,
|
|
179
|
+
): void
|
|
180
|
+
|
|
181
|
+
getAggregates(keyspaceName: string, name: string): Promise<Aggregate[]>
|
|
182
|
+
|
|
183
|
+
getFunction(
|
|
184
|
+
keyspaceName: string,
|
|
185
|
+
name: string,
|
|
186
|
+
signature: string[] | Array<{ code: number; info: any }>,
|
|
187
|
+
callback: ValueCallback<SchemaFunction>,
|
|
188
|
+
): void
|
|
189
|
+
|
|
190
|
+
getFunction(
|
|
191
|
+
keyspaceName: string,
|
|
192
|
+
name: string,
|
|
193
|
+
signature: string[] | Array<{ code: number; info: any }>,
|
|
194
|
+
): Promise<SchemaFunction>
|
|
195
|
+
|
|
196
|
+
getFunctions(
|
|
197
|
+
keyspaceName: string,
|
|
198
|
+
name: string,
|
|
199
|
+
callback: ValueCallback<SchemaFunction[]>,
|
|
200
|
+
): void
|
|
201
|
+
|
|
202
|
+
getFunctions(
|
|
203
|
+
keyspaceName: string,
|
|
204
|
+
name: string,
|
|
205
|
+
): Promise<SchemaFunction[]>
|
|
206
|
+
|
|
207
|
+
getMaterializedView(
|
|
208
|
+
keyspaceName: string,
|
|
209
|
+
name: string,
|
|
210
|
+
callback: ValueCallback<MaterializedView>,
|
|
211
|
+
): void
|
|
212
|
+
|
|
213
|
+
getMaterializedView(
|
|
214
|
+
keyspaceName: string,
|
|
215
|
+
name: string,
|
|
216
|
+
callback: EmptyCallback,
|
|
217
|
+
): Promise<MaterializedView>
|
|
218
|
+
|
|
219
|
+
getReplicas(
|
|
220
|
+
keyspaceName: string,
|
|
221
|
+
token: Buffer | token.Token | token.TokenRange,
|
|
222
|
+
): Host[]
|
|
223
|
+
|
|
224
|
+
getTable(
|
|
225
|
+
keyspaceName: string,
|
|
226
|
+
name: string,
|
|
227
|
+
callback: ValueCallback<TableMetadata>,
|
|
228
|
+
): void
|
|
229
|
+
|
|
230
|
+
getTable(keyspaceName: string, name: string): Promise<TableMetadata>
|
|
231
|
+
|
|
232
|
+
getTokenRanges(): Set<token.TokenRange>
|
|
233
|
+
|
|
234
|
+
getTokenRangesForHost(
|
|
235
|
+
keyspaceName: string,
|
|
236
|
+
host: Host,
|
|
237
|
+
): Set<token.TokenRange> | null
|
|
238
|
+
|
|
239
|
+
getTrace(
|
|
240
|
+
traceId: Uuid,
|
|
241
|
+
consistency: types.consistencies,
|
|
242
|
+
callback: ValueCallback<QueryTrace>,
|
|
243
|
+
): void
|
|
244
|
+
|
|
245
|
+
getTrace(
|
|
246
|
+
traceId: Uuid,
|
|
247
|
+
consistency: types.consistencies,
|
|
248
|
+
): Promise<QueryTrace>
|
|
249
|
+
|
|
250
|
+
getTrace(traceId: Uuid, callback: ValueCallback<QueryTrace>): void
|
|
251
|
+
|
|
252
|
+
getTrace(traceId: Uuid): Promise<QueryTrace>
|
|
253
|
+
|
|
254
|
+
getUdt(
|
|
255
|
+
keyspaceName: string,
|
|
256
|
+
name: string,
|
|
257
|
+
callback: ValueCallback<Udt>,
|
|
258
|
+
): void
|
|
259
|
+
|
|
260
|
+
getUdt(keyspaceName: string, name: string): Promise<Udt>
|
|
261
|
+
|
|
262
|
+
newToken(components: Buffer[] | Buffer | string): token.Token
|
|
263
|
+
|
|
264
|
+
newTokenRange(start: token.Token, end: token.Token): token.TokenRange
|
|
265
|
+
|
|
266
|
+
refreshKeyspace(name: string, callback: EmptyCallback): void
|
|
267
|
+
|
|
268
|
+
refreshKeyspace(name: string): Promise<void>
|
|
269
|
+
|
|
270
|
+
refreshKeyspaces(waitReconnect: boolean, callback: EmptyCallback): void
|
|
271
|
+
|
|
272
|
+
refreshKeyspaces(waitReconnect?: boolean): Promise<void>
|
|
273
|
+
|
|
274
|
+
refreshKeyspaces(callback: EmptyCallback): void
|
|
275
|
+
}
|
|
276
|
+
}
|