dbSDK
Resources

Query two drivers in one workflow

Open two stores in the same workflow. Same verbs, each driver's native query shape. The SDK does not translate one language into the other.

Investigation consoles and support tools often need more than one store in the same workflow. Open each connection independently. DB SDK does not merge those stores or rewrite one query language as another.

tools.ts
const dbA = await connect({ provider: providerA(optsA) });
const dbB = await connect({ provider: providerB(optsB) });

const [left, right] = await Promise.all([
  dbA.introspect(),
  dbB.introspect(),
]);

Same verbs, native queries

test, introspect, query, and close are the same for every provider. The query input is not. Each driver keeps its native shape. Adding a driver should mean adding a provider package, not rewriting the host.

query.ts
const users = await dbA.query({
  sql: "SELECT id, email FROM users WHERE plan = $1",
  params: ["pro"],
});

const sessions = await dbB.query({
  collection: "sessions",
  filters: [{ field: "plan", op: "==", value: "pro" }],
  limit: 20,
});