OriginChainDB

SDKs

Choose a language and understand which SDK version each example requires.

Use an SDK to send database requests from your application. Start with your language, then check its version before copying an example.

Choose an SDK and verify its versionSource releases and package-registry versions can expose different APIs; follow the selected version’s instructions.
  1. Choose your languageOpen the SDK’s source and setup guide.
  2. Check its release instructionsConfirm the version and installation method.
  3. Configure a server-side connectionUse the complete address and token from Connect.
  4. Run a small readInspect the returned result before building a larger workflow.

Choose your language

The SDKs are available on GitHub. Choose a language for installation instructions and working examples. These guides use the 1.0 source candidate; install it from the linked repository.

The 1.0 source is public, but the new packages are not on registries yet. npm and PyPI still serve earlier APIs; an unversioned install will not install the Client examples in these guides. To use HTTP directly, start with API authentication.

What the candidate supports

Creating a client connects your application; it does not create tables, generate embeddings or index your text. Prepare the data for the operation you want to call.

TaskSDK namespaceWhat it does
Run SQLsqlSend parameterized statements and inspect complete results.
Define dataschemasList schemas, read a schema or register TOML.
Read and write recordsrowsGet a record, put a record or send a batch.
Search by meaningvectorStore vectors, search nearby vectors or delete one.
Search textftsIndex text; run ranked, boolean or phrase searches.
Follow relationshipsgraphRun Cypher, find neighbors or walk a graph.

Usage and query metrics are also available. Method names follow each language's conventions. Your database must support the operation, and your credential must have permission to use it. Advanced helpers can differ between languages.

Connect to a database

Set two server-side environment variables:

VariableValue
OC_URLThe complete HTTPS database address from Connect. Keep its path unchanged.
OC_TOKENThe credential shown for that connection.

The candidate appends operation paths to OC_URL; you do not build a tenant URL yourself. PostgreSQL tools use a separate database login, not these SDK settings. See API authentication for connection availability and credential types.

Read the complete result

Read a query result in two parts: the returned data and the outcome of the operation.

You need to knowRead
Which records matched?Rows with their column metadata.
Did a write finish?Confirmed write counts, when provided; buffered counts alone do not confirm a commit.
Did every statement finish?Nested statement results and any partial batch error.
Why did search return this item?Its record ID and the score for the chosen search method.

sql.run returns rows, column metadata, confirmed write counts, nested statement results and the original response. A missing write count means unknown, not zero. A batch can partially succeed; inspect its partial results before repeating any statement.

Full-text results contain hits and optional facets in every search mode. Numeric and date/time strings are preserved rather than silently converted.

Timeouts and retries

The candidate uses a 60-second default timeout and does not retry requests automatically. Ruby applies that timeout to connection, read and write inactivity. Redirects are not followed.

A timeout, cancellation or 503 can happen after a write commits. Check the outcome before retrying. An idempotency key does not make arbitrary SQL safe to replay. Python and TypeScript retain explicit retry options for existing integrations.

Diagnose a failed request

Record the SDK version, operation, HTTP status and request ID when available. Keep tokens and private query results out of logs. A protocol error is different from a valid empty result.

Source versions

Use the candidate README at a verified source commit for setup. Registry releases remain separate; a source update does not publish a package.

Read the API reference · Create your first table · Use the CLI

© 2026 Silicoyn Technologies Pvt Ltd

On this page