ydb-platform/ydb-js-sdk
ydb-platform/ydb-js-sdk has 82 GitHub stars and 50 forks. Star changes are not measured yet. Last checked 2026-11-14 02:03 UTC. Last push 2026-11-10.
Gemessener Sternzuwachs
- in 24h
- Verlauf wird gesammelt
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
Über uns
YDB JavaScript/TypeScript SDK
DatenREADME.md
OriginalYDB JavaScript SDK
Modern, modular SDK for YDB in TypeScript/JavaScript.
- Type‑safe YQL queries with tagged templates
- Automatic parameter binding and transactions
- Rich value/type system with
@ydbjs/value - Clear errors, retries, and diagnostics
Other versions
Packages
@ydbjs/core: Core connection and utilities@ydbjs/query: YQL queries, transactions, parameters@ydbjs/coordination: Coordination nodes and distributed semaphores@ydbjs/value: YDB types and values@ydbjs/api: gRPC/Protobuf service definitions@ydbjs/error: YDB error handling@ydbjs/auth: Authentication (tokens, anonymous, metadata)@ydbjs/retry: Flexible retry policies
Quick Start
1) Install
npm install @ydbjs/core @ydbjs/query
TypeScript projects require TypeScript 7 or later.
2) Connect and Query
import { Driver } from '@ydbjs/core'
import { query } from '@ydbjs/query'
const driver = new Driver('grpc://localhost:2136/local')
await driver.ready()
const sql = query(driver)
const resultSets = await sql`SELECT 1 + 1 AS sum`
console.log(resultSets) // [ [ { sum: 2 } ] ]
Documentation
- @ydbjs/core
- @ydbjs/query
- @ydbjs/coordination
- @ydbjs/value
- @ydbjs/api
- @ydbjs/error
- @ydbjs/auth
- @ydbjs/retry
Project docs:
Examples
Examples
- Parameterized query:
import { Int64, Optional, PrimitiveType } from '@ydbjs/value'
const sql = query(driver)
await sql`SELECT ${new Optional(new Int64(100n), new PrimitiveType('INT64'))};`
– Transactions:
await sql.begin(async (tx, signal) => {
await tx`INSERT INTO users (id, name) VALUES (1, 'Alice')`
await tx`UPDATE users SET name = 'Bob' WHERE id = 1`
})
– Error handling:
import { YdbError } from '@ydbjs/error'
try {
await sql`SELECT * FROM non_existent_table`
} catch (e) {
if (e instanceof YdbError) {
console.error('YDB Error:', e.message)
}
}
AI Assistant Configuration
For projects using YDB SDK, you can configure AI assistants (GitHub Copilot, Cursor, etc.) to generate secure YQL code.
Multiple example configuration files are provided in packages/query/ai-instructions/:
.cursorrules.example- Cursor AI instructions.instructions.example.md- General AI assistant guidelines.copilot-instructions.example.md- GitHub Copilot specific.ai-instructions.example.md- Alternative general format
Copy the appropriate file to your project root to enable secure AI code generation that follows YDB security best practices.
FAQ
- Add a new service? Use
@ydbjs/apifor gRPC definitions. - Work with YDB types? Use
@ydbjs/value. - Implement retries? Use
@ydbjs/retry. - More examples? See package docs, local examples, or explore ydb-js-examples repository with comprehensive real-world examples.
Developer Guide
- Build:
npm run build - Test (all):
npm test - Lint:
npm run lint
Ähnliche Projekte entdecken
Asabeneh/30-Days-Of-Python
Die Programmier-Challenge 30 Days of Python ist eine Schritt-für-Schritt-Anleitung, um die Programmiersprache Python in 30 Tagen zu lernen. Diese Challenge kann mehr als 100 Tage dauern. Gehe in deinem eigenen Tempo vor. Diese Videos können ebenfalls helfen: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,710 Sternegrafana/grafana
Offene und kombinierbare Plattform für Observability und Datenvisualisierung. Visualisiert Metriken, Logs und Traces aus mehreren Quellen wie Prometheus, Loki, Elasticsearch, InfluxDB, Postgres und vielen weiteren.
77,892 Sterneredis/redis
Für Entwickler, die echtzeitfähige, datengesteuerte Anwendungen erstellen, ist Redis der bevorzugte, schnellste und funktionsreichste Cache, Datenstrukturserver und die entsprechende Abfrageengine für Dokumente und Vektoren.
77,490 Sterneapache/superset
Apache Superset ist eine Plattform für Datenvisualisierung und Datenexploration.
75,521 Sterne