@qubu/adapter-aws-rds-data-api
v0.6.3
Published
Experimental Qubu adapter for the AWS Aurora RDS Data API.
Readme
@qubu/adapter-aws-rds-data-api
Experimental: this package is not production-ready. It has no provider-backed CI or live Aurora validation. Production hardening needs funded AWS infrastructure and an external maintainer.
Choose the dialect-specific entry point for the Aurora engine you use. Both
entry points adapt the AWS SDK's RDSDataClient to Qubu, and neither requires
an engine option:
import { RDSDataClient } from "@aws-sdk/client-rds-data"
import { rdsDataApiAdapter } from "@qubu/adapter-aws-rds-data-api/postgres"
import { qubu } from "qubu"
const client = new RDSDataClient({})
const db = qubu(
rdsDataApiAdapter(client, {
resourceArn: process.env.AURORA_RESOURCE_ARN!,
secretArn: process.env.AURORA_SECRET_ARN!,
database: "app",
}),
)For Aurora MySQL, change only the import:
import { rdsDataApiAdapter } from "@qubu/adapter-aws-rds-data-api/mysql"Each adapter's dialect preserves its PostgreSQL or MySQL policy while
rendering AWS named placeholders (:p1, :p2, ...). The adapter encodes
nulls, booleans, numbers, strings, dates, bytes, and JSON as Data API fields;
it maps result metadata into object rows, affected-row counts, and generated
insert IDs. Callback transactions use the Data API's begin/execute/commit or
rollback transaction-ID sequence.
Limitations
- No streaming, migration adapter, or nested transaction/savepoint API is provided.
- AWS errors pass through unchanged. Abort signals are forwarded to AWS SDK requests, but server-side cancellation guarantees have not been validated.
- This integration needs funded Aurora test infrastructure or an external maintainer before production use; provider-backed production behavior is not claimed.
- Data API decimal and long results default to string form so precision is not
silently lost; override
resultSetOptionsonly when numeric conversion is intentional. - The
schemaoption is rejected when executing statements; qualify schema identifiers in SQL instead. - Non-finite numbers and unsafe integer numbers are rejected. Pass large integers as bigint or strings; dates must be valid and JSON values must be serializable.
