2.4.2 • Published 3 days ago

ydb-orm v2.4.2

Weekly downloads
-
License
see in LICENSE
Repository
github
Last release
3 days ago

💾 YDB simple ORM


Minimal ORM lib for YDB database for fast development services with serverless ecosystem

Usage example

  • as lib:
const { Ydb } = require('ydb-orm')

const db = Ydb.init(endpoint, database, {
  endpoint: process.env.YDB_ENDPOINT,
  database: process.env.YDB_DATABASE,

  // one of auth specific method
  credential, // [optional] - auth with sa account credential
  token, // [optional] - auth with iam token
  meta, // [optional] - auth with meta service  (ex. from lambda)

  model: [
    User, // YdbModel list for load
  ],
  timeout: 2000, 
})

Ydb.db // singleton
  • as fastify web-server plugin, separated to fastify-ydb-orm package:
const { YdbFastify } = require('fastify-ydb-orm')

app.register(YdbFastify, {
  endpoint: process.env.YDB_ENDPOINT,
  database: process.env.YDB_DATABASE,

  // same auth option as lib

  model: [
    User, // YdbModel list for load
  ],
  timeout: 2000,

  sync: true, // [optional] enable auto sync model creation/migration
})

// connection in fastify mode not needed

Environment variables

  • YDB_SA_KEY - specific path to service account credential json file

  • YDB_CERTS - specific path to ydb connection certs


Минимальная реализация ORM для YDB базы данных для быстрой разработки сервисов в бессерверной экосистеме на основе лямбда функций

2.4.1

3 days ago

2.4.2

3 days ago

2.4.0

22 days ago

2.3.0

1 month ago

2.2.0

3 months ago

1.6.1

11 months ago

1.6.0

11 months ago

1.5.0

11 months ago

1.4.0

12 months ago

2.1.2

9 months ago

2.1.1

9 months ago

2.1.0

9 months ago

2.0.1

10 months ago

2.0.0

10 months ago

1.3.0

1 year ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago