@aouda/client 0.1.11 → 0.1.12
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/cli/index.cjs +126 -22
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +126 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/{client-CT3GdrvA.d.cts → client-Q83x0Mz9.d.cts} +34 -4
- package/dist/{client-CT3GdrvA.d.ts → client-Q83x0Mz9.d.ts} +34 -4
- package/dist/index.cjs +126 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +126 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-
|
|
2
|
-
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AlterColumnRequest, I as AoudaClientOptions, K as AoudaDataType, M as AppAuthOptions, O as AuthClient, Q as AuthResult, U as AuthUserInfo, V as AuthorizationMode, W as BackupAdminApi, X as BackupMetrics, Y as BackupSummary, Z as BatchMutationResult, _ as BatchOperationInput, $ as BloomFilterMetrics, a0 as BranchInfo, a1 as BranchesApi, a2 as BulkLoadForceAbortRequest, a3 as BulkLoadForceAbortResponse, a4 as BulkLoadListResponse, a5 as BulkLoadProgress, a6 as BulkLoadReplicaProgress, a7 as BulkLoadReplicaProgressDto, a8 as BulkLoadStatusResponse, a9 as CircuitBreakerPolicy, aa as ClusterAdminApi, ab as ClusterMemberEntry, ac as ClusterThisNodeEntry, ad as ColumnSchema, ae as ColumnSummaryForErd, af as ColumnarResponse, ag as ComponentHealthEntry, ah as ComputedColumnDef, ai as ConfigAdminApi, aj as CreateBranchRequest, ak as CreateColumnRequest, al as CreateDatabaseOptions, am as CreatePartitionGrantRequest, an as CreateRlsResolverRequest, ao as CreateTableRequest, ap as DatabaseCoverageEntry, aq as DatabaseInfo, ar as DatabaseMemoryMetrics, as as DatabaseMemoryUsage, at as DatabaseMetricsDto, au as DatabaseOptionsInfo, av as DatabasesApi, aw as DeleteOptions, ax as DiffSummary, ay as FILTER_OPERATORS, az as FilterOperator, aA as HealthAdminApi, aB as IndexInfo, aC as InsertOptions, aD as InsertResult, aE as IoMetrics, aF as JobsApi, aG as LatencyPercentiles, aH as MaterializedQueriesApi, aI as MaterializedQueryDefinition, aJ as MaterializedQueryExecuteOptions, aK as MaterializedQueryExecuteResult, aL as MaterializedQueryMetrics, aM as MaterializedQueryRefreshOptions, aN as MaterializedQueryState, aO as MaterializedQueryStateNumber, aP as MaterializedQueryStatus, aQ as MaterializedQueryType, aR as MaterializedQueryTypeNumber, aS as MemberInfo, aT as MemoryMetrics, aU as MergeBranchOptions, aV as MergeConflict, aW as MergeExecutionResult, aX as MergeResult, aY as MetricsAdminApi, aZ as MetricsHistory, a_ as MetricsHistoryOptions, a$ as MetricsSnapshot, b0 as MetricsSummary, b1 as MutationResult, b2 as NamedArtifactWarning, b3 as NamedMutationResult, b4 as NamedMutationsApi, b5 as NamedQueriesApi, b6 as NamedQueryBatchItem, b7 as NamedQueryBatchSlotResult, b8 as NamedQueryExecuteOptions, b9 as
|
|
1
|
+
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-Q83x0Mz9.cjs';
|
|
2
|
+
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AlterColumnRequest, I as AoudaClientOptions, K as AoudaDataType, M as AppAuthOptions, O as AuthClient, Q as AuthResult, U as AuthUserInfo, V as AuthorizationMode, W as BackupAdminApi, X as BackupMetrics, Y as BackupSummary, Z as BatchMutationResult, _ as BatchOperationInput, $ as BloomFilterMetrics, a0 as BranchInfo, a1 as BranchesApi, a2 as BulkLoadForceAbortRequest, a3 as BulkLoadForceAbortResponse, a4 as BulkLoadListResponse, a5 as BulkLoadProgress, a6 as BulkLoadReplicaProgress, a7 as BulkLoadReplicaProgressDto, a8 as BulkLoadStatusResponse, a9 as CircuitBreakerPolicy, aa as ClusterAdminApi, ab as ClusterMemberEntry, ac as ClusterThisNodeEntry, ad as ColumnSchema, ae as ColumnSummaryForErd, af as ColumnarResponse, ag as ComponentHealthEntry, ah as ComputedColumnDef, ai as ConfigAdminApi, aj as CreateBranchRequest, ak as CreateColumnRequest, al as CreateDatabaseOptions, am as CreatePartitionGrantRequest, an as CreateRlsResolverRequest, ao as CreateTableRequest, ap as DatabaseCoverageEntry, aq as DatabaseInfo, ar as DatabaseMemoryMetrics, as as DatabaseMemoryUsage, at as DatabaseMetricsDto, au as DatabaseOptionsInfo, av as DatabasesApi, aw as DeleteOptions, ax as DiffSummary, ay as FILTER_OPERATORS, az as FilterOperator, aA as HealthAdminApi, aB as IndexInfo, aC as InsertOptions, aD as InsertResult, aE as IoMetrics, aF as JobsApi, aG as LatencyPercentiles, aH as MaterializedQueriesApi, aI as MaterializedQueryDefinition, aJ as MaterializedQueryExecuteOptions, aK as MaterializedQueryExecuteResult, aL as MaterializedQueryMetrics, aM as MaterializedQueryRefreshOptions, aN as MaterializedQueryState, aO as MaterializedQueryStateNumber, aP as MaterializedQueryStatus, aQ as MaterializedQueryType, aR as MaterializedQueryTypeNumber, aS as MemberInfo, aT as MemoryMetrics, aU as MergeBranchOptions, aV as MergeConflict, aW as MergeExecutionResult, aX as MergeResult, aY as MetricsAdminApi, aZ as MetricsHistory, a_ as MetricsHistoryOptions, a$ as MetricsSnapshot, b0 as MetricsSummary, b1 as MutationResult, b2 as NamedArtifactWarning, b3 as NamedMutationResult, b4 as NamedMutationsApi, b5 as NamedQueriesApi, b6 as NamedQueryBatchItem, b7 as NamedQueryBatchSlotResult, b8 as NamedQueryExecuteOptions, b9 as NamedQuerySubscribeOptions, ba as NodeAdminApi, bb as NodeLogEntry, bc as NodeLogLevel, bd as NodeLogStreamOptions, be as NodeLogsQuery, bf as NodeLogsResponse, bg as OpenWriteStreamOptions, bh as PageCacheMetrics, bi as PartitionFunction, bj as PartitionGrant, bk as PartitionGrantsListResponse, bl as PartitioningMetrics, bm as PendingJobListResponse, bn as PendingJobResponse, bo as PerDatabaseLagEntry, bp as PerDatabaseMetrics, bq as PerDatabaseStatusEntry, br as QueryMetrics, bs as QueryResult, bt as QueryStats, bu as ReferenceInfo, bv as RelationshipEndpoint, bw as RelationshipInfo, bx as RenameColumnRequest, by as RenameTableRequest, bz as ReorderColumnsRequest, bA as ReplicationAdminApi, bB as ReplicationMetrics, bC as ResidencyConfig, bD as ResultWarning, bE as RetryPolicy, bF as RlsResolver, bG as RlsResolverRule, bH as RlsResolverRuleInput, bI as RlsResolversListResponse, bJ as SchemaChange, bK as SchemaChangeType, bL as SchemaDiffResult, bM as SchemaRelationshipsResponse, bN as SeedApplyResult, bO as SeedTableApplyResult, bP as ServerAdminApi, bQ as ServerAuthOptions, bR as ServerMemoryResponse, bS as ServerMetricsResponse, bT as ServiceInfo, bU as SimdMetrics, bV as SingleDatabaseMetricsResponse, bW as SortDirection, bX as StorageMetrics, bY as SubscribeOptions, bZ as Subscription, b_ as SubscriptionChangeEvent, b$ as SubscriptionEvent, c0 as SubscriptionInfo, c1 as SubscriptionSnapshotEvent, c2 as TIME_BUCKET_FUNCTIONS, c3 as TableCoverageEntry, c4 as TableNameFromSchema, c5 as TablePolicy, c6 as TableQuery, c7 as TableSchema, c8 as TableSchemaResponse, c9 as TableSummary, ca as TableSummaryForErd, cb as TablesApi, cc as TimeBucketFunction, cd as TimeSeriesMetrics, ce as TransactionMetrics, cf as TypeGenerationOptions, cg as UpdateOptions, ch as UpdateRlsResolverRequest, ci as UpdateTableOptionsRequest, cj as UpdateTablePolicyRequest, ck as UserProfile, cl as WalMetrics, cm as WhereGroupBuilder, cn as WhereOperator, co as WriteStream, cp as coerceColumnarValue, cq as columnarToRows, cr as createAoudaClient } from './client-Q83x0Mz9.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @aouda/client error types.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-
|
|
2
|
-
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AlterColumnRequest, I as AoudaClientOptions, K as AoudaDataType, M as AppAuthOptions, O as AuthClient, Q as AuthResult, U as AuthUserInfo, V as AuthorizationMode, W as BackupAdminApi, X as BackupMetrics, Y as BackupSummary, Z as BatchMutationResult, _ as BatchOperationInput, $ as BloomFilterMetrics, a0 as BranchInfo, a1 as BranchesApi, a2 as BulkLoadForceAbortRequest, a3 as BulkLoadForceAbortResponse, a4 as BulkLoadListResponse, a5 as BulkLoadProgress, a6 as BulkLoadReplicaProgress, a7 as BulkLoadReplicaProgressDto, a8 as BulkLoadStatusResponse, a9 as CircuitBreakerPolicy, aa as ClusterAdminApi, ab as ClusterMemberEntry, ac as ClusterThisNodeEntry, ad as ColumnSchema, ae as ColumnSummaryForErd, af as ColumnarResponse, ag as ComponentHealthEntry, ah as ComputedColumnDef, ai as ConfigAdminApi, aj as CreateBranchRequest, ak as CreateColumnRequest, al as CreateDatabaseOptions, am as CreatePartitionGrantRequest, an as CreateRlsResolverRequest, ao as CreateTableRequest, ap as DatabaseCoverageEntry, aq as DatabaseInfo, ar as DatabaseMemoryMetrics, as as DatabaseMemoryUsage, at as DatabaseMetricsDto, au as DatabaseOptionsInfo, av as DatabasesApi, aw as DeleteOptions, ax as DiffSummary, ay as FILTER_OPERATORS, az as FilterOperator, aA as HealthAdminApi, aB as IndexInfo, aC as InsertOptions, aD as InsertResult, aE as IoMetrics, aF as JobsApi, aG as LatencyPercentiles, aH as MaterializedQueriesApi, aI as MaterializedQueryDefinition, aJ as MaterializedQueryExecuteOptions, aK as MaterializedQueryExecuteResult, aL as MaterializedQueryMetrics, aM as MaterializedQueryRefreshOptions, aN as MaterializedQueryState, aO as MaterializedQueryStateNumber, aP as MaterializedQueryStatus, aQ as MaterializedQueryType, aR as MaterializedQueryTypeNumber, aS as MemberInfo, aT as MemoryMetrics, aU as MergeBranchOptions, aV as MergeConflict, aW as MergeExecutionResult, aX as MergeResult, aY as MetricsAdminApi, aZ as MetricsHistory, a_ as MetricsHistoryOptions, a$ as MetricsSnapshot, b0 as MetricsSummary, b1 as MutationResult, b2 as NamedArtifactWarning, b3 as NamedMutationResult, b4 as NamedMutationsApi, b5 as NamedQueriesApi, b6 as NamedQueryBatchItem, b7 as NamedQueryBatchSlotResult, b8 as NamedQueryExecuteOptions, b9 as
|
|
1
|
+
import { T as Transport, B as BulkLoadOptions, a as BulkLoadJobHandle, R as ReplicationStatusResponse, b as TopologyResponse, C as CoverageResponse, H as HealthStatus, c as ReadinessResponse, D as DetailedHealthResponse, N as NodeInfoResponse, d as TriggerBackupRequest, e as TriggerBackupResponse, L as ListBackupsResponse, f as RestoreBackupResponse, g as BackupSchedule, J as JoinClusterRequest, h as JoinClusterResponse, i as LeaveClusterResponse, P as PromoteClusterResponse, F as FailoverClusterResponse, j as DrainClusterResponse, k as ClusterConfigResponse, l as ClusterConfigPatchRequest, S as SchemaLike, m as DefaultSchema, A as AoudaClient } from './client-Q83x0Mz9.js';
|
|
2
|
+
export { n as AGGREGATE_FUNCTIONS, o as AOUDA_DATA_TYPES, p as AddColumnRequest, q as AdminApi, r as AdminBackupConfig, s as AdminBackupPatch, t as AdminConfigPatchRequest, u as AdminConfigResponse, v as AdminConfigSchemaResponse, w as AdminLoggingConfig, x as AdminLoggingPatch, y as AdminMemoryConfig, z as AdminMemoryPatch, E as AggregateFunctionName, G as AlterColumnRequest, I as AoudaClientOptions, K as AoudaDataType, M as AppAuthOptions, O as AuthClient, Q as AuthResult, U as AuthUserInfo, V as AuthorizationMode, W as BackupAdminApi, X as BackupMetrics, Y as BackupSummary, Z as BatchMutationResult, _ as BatchOperationInput, $ as BloomFilterMetrics, a0 as BranchInfo, a1 as BranchesApi, a2 as BulkLoadForceAbortRequest, a3 as BulkLoadForceAbortResponse, a4 as BulkLoadListResponse, a5 as BulkLoadProgress, a6 as BulkLoadReplicaProgress, a7 as BulkLoadReplicaProgressDto, a8 as BulkLoadStatusResponse, a9 as CircuitBreakerPolicy, aa as ClusterAdminApi, ab as ClusterMemberEntry, ac as ClusterThisNodeEntry, ad as ColumnSchema, ae as ColumnSummaryForErd, af as ColumnarResponse, ag as ComponentHealthEntry, ah as ComputedColumnDef, ai as ConfigAdminApi, aj as CreateBranchRequest, ak as CreateColumnRequest, al as CreateDatabaseOptions, am as CreatePartitionGrantRequest, an as CreateRlsResolverRequest, ao as CreateTableRequest, ap as DatabaseCoverageEntry, aq as DatabaseInfo, ar as DatabaseMemoryMetrics, as as DatabaseMemoryUsage, at as DatabaseMetricsDto, au as DatabaseOptionsInfo, av as DatabasesApi, aw as DeleteOptions, ax as DiffSummary, ay as FILTER_OPERATORS, az as FilterOperator, aA as HealthAdminApi, aB as IndexInfo, aC as InsertOptions, aD as InsertResult, aE as IoMetrics, aF as JobsApi, aG as LatencyPercentiles, aH as MaterializedQueriesApi, aI as MaterializedQueryDefinition, aJ as MaterializedQueryExecuteOptions, aK as MaterializedQueryExecuteResult, aL as MaterializedQueryMetrics, aM as MaterializedQueryRefreshOptions, aN as MaterializedQueryState, aO as MaterializedQueryStateNumber, aP as MaterializedQueryStatus, aQ as MaterializedQueryType, aR as MaterializedQueryTypeNumber, aS as MemberInfo, aT as MemoryMetrics, aU as MergeBranchOptions, aV as MergeConflict, aW as MergeExecutionResult, aX as MergeResult, aY as MetricsAdminApi, aZ as MetricsHistory, a_ as MetricsHistoryOptions, a$ as MetricsSnapshot, b0 as MetricsSummary, b1 as MutationResult, b2 as NamedArtifactWarning, b3 as NamedMutationResult, b4 as NamedMutationsApi, b5 as NamedQueriesApi, b6 as NamedQueryBatchItem, b7 as NamedQueryBatchSlotResult, b8 as NamedQueryExecuteOptions, b9 as NamedQuerySubscribeOptions, ba as NodeAdminApi, bb as NodeLogEntry, bc as NodeLogLevel, bd as NodeLogStreamOptions, be as NodeLogsQuery, bf as NodeLogsResponse, bg as OpenWriteStreamOptions, bh as PageCacheMetrics, bi as PartitionFunction, bj as PartitionGrant, bk as PartitionGrantsListResponse, bl as PartitioningMetrics, bm as PendingJobListResponse, bn as PendingJobResponse, bo as PerDatabaseLagEntry, bp as PerDatabaseMetrics, bq as PerDatabaseStatusEntry, br as QueryMetrics, bs as QueryResult, bt as QueryStats, bu as ReferenceInfo, bv as RelationshipEndpoint, bw as RelationshipInfo, bx as RenameColumnRequest, by as RenameTableRequest, bz as ReorderColumnsRequest, bA as ReplicationAdminApi, bB as ReplicationMetrics, bC as ResidencyConfig, bD as ResultWarning, bE as RetryPolicy, bF as RlsResolver, bG as RlsResolverRule, bH as RlsResolverRuleInput, bI as RlsResolversListResponse, bJ as SchemaChange, bK as SchemaChangeType, bL as SchemaDiffResult, bM as SchemaRelationshipsResponse, bN as SeedApplyResult, bO as SeedTableApplyResult, bP as ServerAdminApi, bQ as ServerAuthOptions, bR as ServerMemoryResponse, bS as ServerMetricsResponse, bT as ServiceInfo, bU as SimdMetrics, bV as SingleDatabaseMetricsResponse, bW as SortDirection, bX as StorageMetrics, bY as SubscribeOptions, bZ as Subscription, b_ as SubscriptionChangeEvent, b$ as SubscriptionEvent, c0 as SubscriptionInfo, c1 as SubscriptionSnapshotEvent, c2 as TIME_BUCKET_FUNCTIONS, c3 as TableCoverageEntry, c4 as TableNameFromSchema, c5 as TablePolicy, c6 as TableQuery, c7 as TableSchema, c8 as TableSchemaResponse, c9 as TableSummary, ca as TableSummaryForErd, cb as TablesApi, cc as TimeBucketFunction, cd as TimeSeriesMetrics, ce as TransactionMetrics, cf as TypeGenerationOptions, cg as UpdateOptions, ch as UpdateRlsResolverRequest, ci as UpdateTableOptionsRequest, cj as UpdateTablePolicyRequest, ck as UserProfile, cl as WalMetrics, cm as WhereGroupBuilder, cn as WhereOperator, co as WriteStream, cp as coerceColumnarValue, cq as columnarToRows, cr as createAoudaClient } from './client-Q83x0Mz9.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @aouda/client error types.
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// package.json
|
|
2
2
|
var package_default = {
|
|
3
3
|
name: "@aouda/client",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.12",
|
|
5
5
|
description: "Official TypeScript/JavaScript client library for Aouda",
|
|
6
6
|
type: "module",
|
|
7
7
|
main: "./dist/index.cjs",
|
|
@@ -2027,7 +2027,7 @@ var AsyncEventQueue = class {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
};
|
|
2029
2029
|
var TableSubscription = class {
|
|
2030
|
-
constructor(transport,
|
|
2030
|
+
constructor(transport, identity, options = {}, onWarnings) {
|
|
2031
2031
|
this._queue = new AsyncEventQueue();
|
|
2032
2032
|
this._active = true;
|
|
2033
2033
|
this._started = false;
|
|
@@ -2037,11 +2037,11 @@ var TableSubscription = class {
|
|
|
2037
2037
|
this._forceFreshSubscribe = false;
|
|
2038
2038
|
this.id = createStreamingId("sub");
|
|
2039
2039
|
this._transport = transport;
|
|
2040
|
-
this.
|
|
2041
|
-
this._baseFilter = baseFilter;
|
|
2040
|
+
this._identity = identity;
|
|
2042
2041
|
this._onSnapshot = options.onSnapshot;
|
|
2043
2042
|
this._onChange = options.onChange;
|
|
2044
2043
|
this._onError = options.onError;
|
|
2044
|
+
this._onWarnings = onWarnings;
|
|
2045
2045
|
this._conflate = options.conflate;
|
|
2046
2046
|
this._reconnectHandlerKey = `${this.id}::reconnect`;
|
|
2047
2047
|
}
|
|
@@ -2104,12 +2104,18 @@ var TableSubscription = class {
|
|
|
2104
2104
|
async _sendSubscribe(resumeFrom) {
|
|
2105
2105
|
const message = {
|
|
2106
2106
|
type: "subscribe",
|
|
2107
|
-
id: this.id
|
|
2108
|
-
target: this._tableName
|
|
2107
|
+
id: this.id
|
|
2109
2108
|
};
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2109
|
+
if (this._identity.kind === "named") {
|
|
2110
|
+
message.hash = this._identity.hash;
|
|
2111
|
+
if (this._identity.args !== void 0) {
|
|
2112
|
+
message.args = this._identity.args;
|
|
2113
|
+
}
|
|
2114
|
+
} else {
|
|
2115
|
+
message.target = this._identity.target;
|
|
2116
|
+
if (this._identity.filter !== void 0) {
|
|
2117
|
+
message.filter = this._identity.filter;
|
|
2118
|
+
}
|
|
2113
2119
|
}
|
|
2114
2120
|
if (resumeFrom !== void 0) {
|
|
2115
2121
|
message.resume_from = resumeFrom;
|
|
@@ -2148,6 +2154,9 @@ var TableSubscription = class {
|
|
|
2148
2154
|
}
|
|
2149
2155
|
_handleSnapshotComplete(message) {
|
|
2150
2156
|
this._lastVersion = message.version;
|
|
2157
|
+
if (message.warnings != null && message.warnings.length > 0) {
|
|
2158
|
+
this._onWarnings?.(message.warnings);
|
|
2159
|
+
}
|
|
2151
2160
|
const rows = this._pendingSnapshotRows;
|
|
2152
2161
|
this._pendingSnapshotRows = [];
|
|
2153
2162
|
this._onSnapshot?.(rows, message.version);
|
|
@@ -2897,17 +2906,16 @@ var TableQuery = class _TableQuery {
|
|
|
2897
2906
|
const whereClause = this.buildWhereClause();
|
|
2898
2907
|
const queryFilter = buildSubscriptionFilter(whereClause);
|
|
2899
2908
|
const mergedFilter = mergeFilterObjects(queryFilter, options.filter);
|
|
2900
|
-
const subscription = new TableSubscription(
|
|
2901
|
-
|
|
2902
|
-
this.tableName,
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
);
|
|
2909
|
+
const subscription = new TableSubscription(wsTransport, {
|
|
2910
|
+
kind: "table",
|
|
2911
|
+
target: this.tableName,
|
|
2912
|
+
filter: mergedFilter
|
|
2913
|
+
}, {
|
|
2914
|
+
onSnapshot: options.onSnapshot,
|
|
2915
|
+
onChange: options.onChange,
|
|
2916
|
+
onError: options.onError,
|
|
2917
|
+
conflate: options.conflate
|
|
2918
|
+
});
|
|
2911
2919
|
subscription.start();
|
|
2912
2920
|
return subscription;
|
|
2913
2921
|
}
|
|
@@ -3493,10 +3501,84 @@ function serializeUpdateValue(col, val) {
|
|
|
3493
3501
|
else: toNode(cond.else)
|
|
3494
3502
|
};
|
|
3495
3503
|
}
|
|
3504
|
+
if ("$upper" in val) {
|
|
3505
|
+
return { type: "call", fn: "upper", args: [unaryCallArg(col, val.$upper)] };
|
|
3506
|
+
}
|
|
3507
|
+
if ("$lower" in val) {
|
|
3508
|
+
return { type: "call", fn: "lower", args: [unaryCallArg(col, val.$lower)] };
|
|
3509
|
+
}
|
|
3510
|
+
if ("$trim" in val) {
|
|
3511
|
+
return { type: "call", fn: "trim", args: [unaryCallArg(col, val.$trim)] };
|
|
3512
|
+
}
|
|
3513
|
+
if ("$concat" in val) {
|
|
3514
|
+
const parts = val.$concat;
|
|
3515
|
+
return {
|
|
3516
|
+
type: "call",
|
|
3517
|
+
fn: "concat",
|
|
3518
|
+
args: parts.map((p) => valueToExprNode(p))
|
|
3519
|
+
};
|
|
3520
|
+
}
|
|
3521
|
+
if ("$substring" in val) {
|
|
3522
|
+
const spec = val.$substring;
|
|
3523
|
+
if (Array.isArray(spec)) {
|
|
3524
|
+
return {
|
|
3525
|
+
type: "call",
|
|
3526
|
+
fn: "substring",
|
|
3527
|
+
args: [{ type: "colRef", col }, ...spec.map((p) => valueToExprNode(p))]
|
|
3528
|
+
};
|
|
3529
|
+
}
|
|
3530
|
+
return {
|
|
3531
|
+
type: "call",
|
|
3532
|
+
fn: "substring",
|
|
3533
|
+
args: [{ type: "colRef", col }, { type: "literal", value: spec }]
|
|
3534
|
+
};
|
|
3535
|
+
}
|
|
3536
|
+
if ("$round" in val) {
|
|
3537
|
+
return {
|
|
3538
|
+
type: "call",
|
|
3539
|
+
fn: "round",
|
|
3540
|
+
args: [
|
|
3541
|
+
{ type: "colRef", col },
|
|
3542
|
+
{ type: "literal", value: val.$round }
|
|
3543
|
+
]
|
|
3544
|
+
};
|
|
3545
|
+
}
|
|
3546
|
+
if ("$roundTo" in val) {
|
|
3547
|
+
return {
|
|
3548
|
+
type: "call",
|
|
3549
|
+
fn: "roundTo",
|
|
3550
|
+
args: [
|
|
3551
|
+
{ type: "colRef", col },
|
|
3552
|
+
{ type: "literal", value: val.$roundTo }
|
|
3553
|
+
]
|
|
3554
|
+
};
|
|
3555
|
+
}
|
|
3556
|
+
if ("$cast" in val) {
|
|
3557
|
+
return {
|
|
3558
|
+
type: "call",
|
|
3559
|
+
fn: "cast",
|
|
3560
|
+
args: [
|
|
3561
|
+
{ type: "colRef", col },
|
|
3562
|
+
{ type: "literal", value: val.$cast }
|
|
3563
|
+
]
|
|
3564
|
+
};
|
|
3565
|
+
}
|
|
3496
3566
|
throw new Error(
|
|
3497
3567
|
`Unknown expression operator in update() for column '${col}': ${JSON.stringify(val)}`
|
|
3498
3568
|
);
|
|
3499
3569
|
}
|
|
3570
|
+
function unaryCallArg(col, operand) {
|
|
3571
|
+
if (operand === true || operand === 1) {
|
|
3572
|
+
return { type: "colRef", col };
|
|
3573
|
+
}
|
|
3574
|
+
return valueToExprNode(operand);
|
|
3575
|
+
}
|
|
3576
|
+
function valueToExprNode(v) {
|
|
3577
|
+
if (typeof v === "string" && v.startsWith("$")) {
|
|
3578
|
+
return { type: "colRef", col: v.slice(1) };
|
|
3579
|
+
}
|
|
3580
|
+
return { type: "literal", value: v };
|
|
3581
|
+
}
|
|
3500
3582
|
|
|
3501
3583
|
// src/tables.ts
|
|
3502
3584
|
function validateNonEmptyString(value, name) {
|
|
@@ -4657,10 +4739,11 @@ function emptyStats() {
|
|
|
4657
4739
|
};
|
|
4658
4740
|
}
|
|
4659
4741
|
var NamedQueriesApi = class {
|
|
4660
|
-
constructor(transport, database, onWarning) {
|
|
4742
|
+
constructor(transport, database, onWarning, getStreamingTransport) {
|
|
4661
4743
|
this.transport = transport;
|
|
4662
4744
|
this.database = database;
|
|
4663
4745
|
this.onWarning = onWarning;
|
|
4746
|
+
this.getStreamingTransport = getStreamingTransport;
|
|
4664
4747
|
}
|
|
4665
4748
|
async execute(hash, args, options) {
|
|
4666
4749
|
if (typeof hash !== "string" || hash.trim().length === 0) {
|
|
@@ -4728,6 +4811,26 @@ var NamedQueriesApi = class {
|
|
|
4728
4811
|
return { isError: false, result };
|
|
4729
4812
|
});
|
|
4730
4813
|
}
|
|
4814
|
+
subscribe(hash, args, options = {}) {
|
|
4815
|
+
if (typeof hash !== "string" || hash.trim().length === 0) {
|
|
4816
|
+
throw new Error("Named query hash must be a non-empty string");
|
|
4817
|
+
}
|
|
4818
|
+
const subscription = new TableSubscription(
|
|
4819
|
+
this.getStreamingTransport(),
|
|
4820
|
+
{ kind: "named", hash, args },
|
|
4821
|
+
{
|
|
4822
|
+
onSnapshot: options.onSnapshot,
|
|
4823
|
+
onChange: options.onChange,
|
|
4824
|
+
onError: options.onError,
|
|
4825
|
+
conflate: options.conflate
|
|
4826
|
+
},
|
|
4827
|
+
(warnings) => {
|
|
4828
|
+
raiseDeprecationWarnings(this.onWarning, warnings);
|
|
4829
|
+
}
|
|
4830
|
+
);
|
|
4831
|
+
subscription.start();
|
|
4832
|
+
return subscription;
|
|
4833
|
+
}
|
|
4731
4834
|
};
|
|
4732
4835
|
var NamedMutationsApi = class {
|
|
4733
4836
|
constructor(transport, database, onWarning) {
|
|
@@ -5551,7 +5654,8 @@ var AoudaClient = class {
|
|
|
5551
5654
|
this._namedQueries = new NamedQueriesApi(
|
|
5552
5655
|
this.transport,
|
|
5553
5656
|
this.database,
|
|
5554
|
-
onNamedArtifactWarning
|
|
5657
|
+
onNamedArtifactWarning,
|
|
5658
|
+
() => this._getOrCreateWebSocketTransport()
|
|
5555
5659
|
);
|
|
5556
5660
|
this._namedMutations = new NamedMutationsApi(
|
|
5557
5661
|
this.transport,
|