ydb-nodejs-sdk icon indicating copy to clipboard operation
ydb-nodejs-sdk copied to clipboard

dev: TypeORM for ydb-nodejs-sdk

Open asmyasnikov opened this issue 3 years ago • 3 comments

Make YDB support in TypeORM (https://typeorm.io).

Since the topic is large, the work is divided into stages

Legend:

    □ - need to be written and tested

    ± - in the code, but not tested yet

    🗸 - done and tested
  1. □ Add support for Generic Query Service, which will be used to retrieve data for TypeORM (https://github.com/ydb-platform/ydb-nodejs-sdk/issues/337).

  2. □ Implement a minimal set of methods to support functionality listed in the TypeORM Quick start (https://typeorm.io/#quick-start) Keep already existing code from https://github.com/ydb-platform/typeorm and test it.
    Interface methods required for the Quick start are collected by trace - for details see https://github.com/Zork33/typeorm/tree/planning-steps-for-implementation

  • [ ] □ #351
  • [ ] ± YdbDriver:buildTableName
  • [ ] ± YdbDriver:connect
  • [ ] ± YdbDriver:disconnect
  • [ ] ± YdbDriver:createGeneratedMap
  • [ ] □ YdbDriver:createParameter
  • [ ] ± YdbDriver:createQueryRunner
  • [ ] ± YdbDriver:createSchemaBuilder
  • [ ] ± YdbDriver:escape
  • [ ] ± YdbDriver:escapeQueryWithParameters
  • [ ] □ YdbDriver:findChangedColumns
  • [ ] □ YdbDriver:getColumnLength
  • [ ] □ YdbDriver:isReturningSqlSupported
  • [ ] □ YdbDriver:normalizeDefault
  • [ ] □ YdbDriver:normalizeIsUnique
  • [ ] ± YdbDriver:normalizeType
  • [ ] □ YdbDriver:obtainMasterConnection
  • [ ] ± YdbDriver:parseTableName
  • [ ] □ YdbDriver:prepareHydratedValue
  • [ ] □ YdbDriver:preparePersistentValue
  • [ ] ± YdbQueryRunner:commitTransaction
  • [ ] ± YdbQueryRunner:connect
  • [ ] □ YdbQueryRunner:getCurrentDatabase
  • [ ] □ YdbQueryRunner:getCurrentSchema
  • [ ] □ YdbQueryRunner:hasTable
  • [ ] ± YdbQueryRunner:rollbackTransaction
  • [ ] ± YdbQueryRunner:query
  • [ ] □ YdbQueryRunner:release
  • [ ] ± YdbQueryRunner:startTransaction
  1. □ Realize the generation of migrations scripts based on the existing Postgres example

  2. □ Make an example of seeding (initial filling of dictionaries) on the basis of migrations scripts.

  3. □ It is desirable that the model of types was as close as possible to postgres implementation, to facilitate the transition

6... Further implement the rest of YdbDriver and YdbQueryRunner methods. There are less than half of them in the initial list

Depends from:

  • #337

asmyasnikov avatar Nov 01 '22 08:11 asmyasnikov

cc: @nikolaymatrosov

DavyJohnes avatar Nov 01 '22 08:11 DavyJohnes

https://github.com/typeorm/typeorm/issues/9484 https://github.com/typeorm/typeorm/issues/8916

DavyJohnes avatar Nov 02 '22 10:11 DavyJohnes

A detailed implementation plan has been added to the issue description

Zork33 avatar Dec 27 '23 10:12 Zork33