@loams/client 0.1.0 → 0.1.1
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 +78 -2
- package/dist/app.d.ts +149 -0
- package/dist/app.js +317 -0
- package/dist/builders/filter.d.ts +96 -0
- package/dist/builders/filter.js +190 -0
- package/dist/builders/schema.d.ts +50 -0
- package/dist/builders/schema.js +92 -0
- package/dist/builders/search.d.ts +159 -0
- package/dist/builders/search.js +307 -0
- package/dist/gen/facade.d.ts +267 -2
- package/dist/gen/facade.js +194 -0
- package/dist/handle.d.ts +67 -0
- package/dist/handle.js +107 -0
- package/dist/index.d.ts +12 -5
- package/dist/index.js +12 -3
- package/dist/loams.d.ts +77 -2
- package/dist/loams.js +84 -6
- package/dist/runtime/batch.d.ts +29 -0
- package/dist/runtime/batch.js +95 -0
- package/dist/runtime/call.d.ts +63 -9
- package/dist/runtime/call.js +243 -41
- package/dist/runtime/consistency.d.ts +65 -11
- package/dist/runtime/consistency.js +212 -46
- package/dist/runtime/errors.d.ts +29 -2
- package/dist/runtime/errors.js +26 -0
- package/dist/runtime/pagination.js +8 -2
- package/dist/runtime/subscribe.d.ts +37 -0
- package/dist/runtime/subscribe.js +128 -0
- package/dist/vendor/proto/collection-v1.d.ts +3 -0
- package/dist/vendor/proto/collection-v1.js +7 -0
- package/dist/vendor/proto/gen/loams/collection/v1/collection_pb.d.ts +1610 -0
- package/dist/vendor/proto/gen/loams/collection/v1/collection_pb.js +399 -0
- package/dist/vendor/proto/gen/loams/collection/v1/document_pb.d.ts +1054 -0
- package/dist/vendor/proto/gen/loams/collection/v1/document_pb.js +327 -0
- package/dist/vendor/proto/gen/loams/collection/v1/query_pb.d.ts +2101 -0
- package/dist/vendor/proto/gen/loams/collection/v1/query_pb.js +608 -0
- package/dist/vendor/proto/gen/loams/graph/v1/graph_pb.d.ts +2299 -0
- package/dist/vendor/proto/gen/loams/graph/v1/graph_pb.js +596 -0
- package/dist/vendor/proto/gen/loams/operations/v1/operations_pb.d.ts +399 -0
- package/dist/vendor/proto/gen/loams/operations/v1/operations_pb.js +118 -0
- package/dist/vendor/proto/gen/loams/sql/v1/sql_pb.d.ts +182 -0
- package/dist/vendor/proto/gen/loams/sql/v1/sql_pb.js +72 -0
- package/dist/vendor/proto/gen/loams/stream/v1/stream_pb.d.ts +688 -0
- package/dist/vendor/proto/gen/loams/stream/v1/stream_pb.js +180 -0
- package/package.json +2 -2
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// SQL over a namespace's collections (design §44 §5.1; API2 Task 1; SDKP
|
|
2
|
+
// P0b, docs/plans/2026-10-19-sdk-parity.md).
|
|
3
|
+
//
|
|
4
|
+
// `SqlService/Query` runs one read-only statement through the same
|
|
5
|
+
// DataFusion context the native REST route (`POST /v1/namespaces/{ns}/sql`)
|
|
6
|
+
// and Flight SQL use: the namespace's collections are its tables, the search
|
|
7
|
+
// table functions are in scope, and anything that is not a query is
|
|
8
|
+
// `invalid_argument`. Rows come back as JSON-shaped values; `QueryArrow`
|
|
9
|
+
// answers the same result as one Arrow IPC stream for callers that read
|
|
10
|
+
// Arrow.
|
|
11
|
+
//
|
|
12
|
+
// ## Parameters
|
|
13
|
+
//
|
|
14
|
+
// `params` binds the positional placeholders `$1…$n`, in order. A value is
|
|
15
|
+
// cast to the type the planner inferred for its placeholder (`n > $1` on an
|
|
16
|
+
// `i64` column binds a JSON number as an `Int64`), and a statement whose
|
|
17
|
+
// placeholder count is not the number of values given is `invalid_argument`
|
|
18
|
+
// with reason `sql_param_count`. Named placeholders (`$name`) are not
|
|
19
|
+
// accepted. A list or an object is not a scalar and is refused.
|
|
20
|
+
//
|
|
21
|
+
// ## Limits
|
|
22
|
+
//
|
|
23
|
+
// `max_rows` (default 10 000, at most 100 000) caps the rows a statement
|
|
24
|
+
// answers; `truncated` says more existed. A statement runs within the
|
|
25
|
+
// server's SQL timeout. `QueryArrow`'s stream is capped at
|
|
26
|
+
// `--sql-arrow-max-bytes` (16 MiB by default); over it the call is
|
|
27
|
+
// `resource_exhausted` with reason `result_too_large` and `metadata.use =
|
|
28
|
+
// "flight"`, because Flight SQL streams a result of any size.
|
|
29
|
+
//
|
|
30
|
+
// ## Consistency
|
|
31
|
+
//
|
|
32
|
+
// `consistency` is `loams.collection.v1.Consistency`, read by the same rule
|
|
33
|
+
// as `GetDocuments`: `at_least` waits for a write's token, `pin` reads a
|
|
34
|
+
// pinned version, and the `loams-consistency-token` request header merges
|
|
35
|
+
// in.
|
|
36
|
+
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
37
|
+
import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
|
|
38
|
+
import { file_loams_collection_v1_document } from "../../collection/v1/document_pb.js";
|
|
39
|
+
import { file_loams_options_v1_options } from "../../options/v1/options_pb.js";
|
|
40
|
+
/**
|
|
41
|
+
* Describes the file loams/sql/v1/sql.proto.
|
|
42
|
+
*/
|
|
43
|
+
export const file_loams_sql_v1_sql = /*@__PURE__*/ fileDesc("ChZsb2Ftcy9zcWwvdjEvc3FsLnByb3RvEgxsb2Ftcy5zcWwudjEisQEKDFF1ZXJ5UmVxdWVzdBIRCgluYW1lc3BhY2UYASABKAkSCwoDc3FsGAIgASgJEiYKBnBhcmFtcxgDIAMoCzIWLmdvb2dsZS5wcm90b2J1Zi5WYWx1ZRI1Cgtjb25zaXN0ZW5jeRgEIAEoCzIgLmxvYW1zLmNvbGxlY3Rpb24udjEuQ29uc2lzdGVuY3kSFQoIbWF4X3Jvd3MYBSABKA1IAIgBAUILCglfbWF4X3Jvd3MiJAoGQ29sdW1uEgwKBG5hbWUYASABKAkSDAoEdHlwZRgCIAEoCSKOAQoNUXVlcnlSZXNwb25zZRIlCgdjb2x1bW5zGAEgAygLMhQubG9hbXMuc3FsLnYxLkNvbHVtbhIoCgRyb3dzGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZRIRCgl0cnVuY2F0ZWQYAyABKAgSGQoRY29uc2lzdGVuY3lfdG9rZW4YBCABKAkitgEKEVF1ZXJ5QXJyb3dSZXF1ZXN0EhEKCW5hbWVzcGFjZRgBIAEoCRILCgNzcWwYAiABKAkSJgoGcGFyYW1zGAMgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlEjUKC2NvbnNpc3RlbmN5GAQgASgLMiAubG9hbXMuY29sbGVjdGlvbi52MS5Db25zaXN0ZW5jeRIVCghtYXhfcm93cxgFIAEoDUgAiAEBQgsKCV9tYXhfcm93cyJVChJRdWVyeUFycm93UmVzcG9uc2USEQoJYXJyb3dfaXBjGAEgASgMEhEKCXRydW5jYXRlZBgCIAEoCBIZChFjb25zaXN0ZW5jeV90b2tlbhgDIAEoCTKfAgoKU3FsU2VydmljZRJQCgVRdWVyeRIaLmxvYW1zLnNxbC52MS5RdWVyeVJlcXVlc3QaGy5sb2Ftcy5zcWwudjEuUXVlcnlSZXNwb25zZSIOkAIBkrUYBxIFcXVlcnkSZQoKUXVlcnlBcnJvdxIfLmxvYW1zLnNxbC52MS5RdWVyeUFycm93UmVxdWVzdBogLmxvYW1zLnNxbC52MS5RdWVyeUFycm93UmVzcG9uc2UiFJACAZK1GA0SC3F1ZXJ5X2Fycm93GliKtRhUCgNzcWwSTVNRTDogb25lIHJlYWQtb25seSBzdGF0ZW1lbnQgb3ZlciBhIG5hbWVzcGFjZSdzIGNvbGxlY3Rpb25zLCB3aXRoIHBhcmFtZXRlcnMuYgZwcm90bzM", [file_google_protobuf_struct, file_loams_collection_v1_document, file_loams_options_v1_options]);
|
|
44
|
+
/**
|
|
45
|
+
* Describes the message loams.sql.v1.QueryRequest.
|
|
46
|
+
* Use `create(QueryRequestSchema)` to create a new message.
|
|
47
|
+
*/
|
|
48
|
+
export const QueryRequestSchema = /*@__PURE__*/ messageDesc(file_loams_sql_v1_sql, 0);
|
|
49
|
+
/**
|
|
50
|
+
* Describes the message loams.sql.v1.Column.
|
|
51
|
+
* Use `create(ColumnSchema)` to create a new message.
|
|
52
|
+
*/
|
|
53
|
+
export const ColumnSchema = /*@__PURE__*/ messageDesc(file_loams_sql_v1_sql, 1);
|
|
54
|
+
/**
|
|
55
|
+
* Describes the message loams.sql.v1.QueryResponse.
|
|
56
|
+
* Use `create(QueryResponseSchema)` to create a new message.
|
|
57
|
+
*/
|
|
58
|
+
export const QueryResponseSchema = /*@__PURE__*/ messageDesc(file_loams_sql_v1_sql, 2);
|
|
59
|
+
/**
|
|
60
|
+
* Describes the message loams.sql.v1.QueryArrowRequest.
|
|
61
|
+
* Use `create(QueryArrowRequestSchema)` to create a new message.
|
|
62
|
+
*/
|
|
63
|
+
export const QueryArrowRequestSchema = /*@__PURE__*/ messageDesc(file_loams_sql_v1_sql, 3);
|
|
64
|
+
/**
|
|
65
|
+
* Describes the message loams.sql.v1.QueryArrowResponse.
|
|
66
|
+
* Use `create(QueryArrowResponseSchema)` to create a new message.
|
|
67
|
+
*/
|
|
68
|
+
export const QueryArrowResponseSchema = /*@__PURE__*/ messageDesc(file_loams_sql_v1_sql, 4);
|
|
69
|
+
/**
|
|
70
|
+
* @generated from service loams.sql.v1.SqlService
|
|
71
|
+
*/
|
|
72
|
+
export const SqlService = /*@__PURE__*/ serviceDesc(file_loams_sql_v1_sql, 0);
|