ydb-platform / ydb-nodejs-sdk

YDB Node.js SDK
Apache License 2.0
61 stars 36 forks source link

dev: Add generic query service #337

Closed Zork33 closed 6 months ago

Zork33 commented 10 months ago

Add generic query service to YDB SDK

The service suppose to be added the same as table service that already exists in YDB SDK.

Legend:

    □ - need to be written and tested

    ± - in the code, but not tested yet

    🗸 - done and tested
  1. □ As a prototype, can be used Query service implemented in .Net SDK (https://github.com/ydb-platform/ydb-dotnet-sdk/blob/main/src/Ydb.Sdk/src/Services/Query/QueryClient.cs)

It looks like one query method is required, and the other two are "sugar". It's likely because in .Net SDK positional arguments are used. In TypeScript it looks more convenient to use named arguments, so that transaction, initial filling of accumulator, reduce method and can be easily combined in one method.

  1. □ In https://github.com/ydb-platform/ydb-nodejs-sdk/blob/main/src/types.ts convert types to js native. Double-check that all available YDB types are supported

Depends from:

Zork33 commented 10 months ago

A detailed implementation plan has been added to the issue description