コンテンツにスキップ

アダプタ検証状況

アダプタ検証状況と実接続設定

Section titled “アダプタ検証状況と実接続設定”

記録日: 2026-10-17。検証レベルを混同しない。モック成功・型検査・互換サービス成功は、本番サービスの接続確認ではない。

Adapter 実施範囲 確認内容 未検証の範囲 必要な設定・前提
NeonAdapter 実PostgreSQL/queryFn pg経由のCRUD、フィルタ、ページング、SQLインジェクション拒否。 / CRUD, filtering, paging and injection resistance through pg. Neon HTTP/serverless SDKの実接続・JWT・接続制限。 / Hosted Neon HTTP SDK, JWT and connection limits. Local: queryFn using pg + TEST_DATABASE_URL (runner-owned). Hosted: constructor connectionString and dedicated Neon database.
SQLiteDataAccessAdapter 実SQLite/Bun・Node CRUD、バインド、ゼロ値、実FileProvider合成。 / CRUD, bound values, zero values and actual FileProvider composition. 複数プロセス同時更新・OS別永続化。 / Multiprocess concurrency and OS persistence. createSqliteDriver(database); Node >=24.0.0 or bun:sqlite.
D1DataAccessAdapter 公式ローカル/Miniflare・workerd 実非同期bindingでCRUD、フィルタ・ページング・SQLバインド・エラー。 / CRUD, filtering/paging/binds/errors via actual local binding. Cloudflare上のD1、配備binding、権限、リモート運用。 / Remote D1, deployed bindings, authorization and operational behavior. Local: generated DB binding. Remote: Worker env.DB binding; provision D1 and configure d1_databases (binding/database_name/database_id), Wrangler login or CLOUDFLARE_API_TOKEN + account ID. No remote D1 runner is provided.
SupabaseAdapter 実REST/PostgREST + PostgreSQL 実supabase-js SDKでCRUD、ゼロ値・並び替え・ページング・不在null・不正JWT拒否。 / Actual SDK CRUD, zero values, sorting/paging, absent-null and invalid-JWT rejection. ホストSupabase Auth、RLSポリシー、Realtime、Storage。ローカル検証はDB管理ロール。 / Hosted Auth/RLS/Realtime/Storage; local tests use a database admin role. createClient(supabaseUrl, supabaseKey); dedicated table with id PK; test user session/JWT and explicit RLS policies for hosted tests. Do not use production service-role keys.
SupabaseGraphQLAdapter 実GraphQL/pg_graphql 実拡張でprojection付きfindとfilter・GraphQLエラー。 / Actual extension find/projection/filter and GraphQL errors. ホスト/利用者JWT/RLS、relation/populate、countのschema設定。書込等の未実装メソッドは検証済みと扱わない。 / Hosted JWT/RLS, relations/populate, count schema settings; unsupported methods are not certified. Supabase client + supabaseUrl/supabaseKey; pg_graphql enabled, exposed schema/table/PK, GraphQL grants and user JWT; configure collection naming and totalCount if required.
MongoApiAdapter 実HTTP + 実MongoDB テスト用mongo/clientゲートウェイでCRUD、集計、count、フィルタ・ページング、不正token拒否。 / Test gateway CRUD/aggregation/count/filtering/paging and bad-token rejection. 利用アプリ固有の本番ゲートウェイ、Atlas認証、populate全組合せ。MongoDB wire clientそのものではない。 / App production gateway, Atlas auth and all populate combinations; this adapter is an HTTP protocol client. baseUrl, optional getToken/fetch; deploy a server implementing [“mongo/client”, operation] backed by MongoDB; provision database/collection and test principal.
ConvexAdapter 実自己ホストConvex 公式backendへ実SDK接続、試験用query/mutationを配備してCRUD/count・ゼロ値。 / Actual SDK and deployed test query/mutation functions for CRUD/count/zero values. Convex Cloud認証・subscriptions・アプリ固有関数の権限/フィルタ。 / Cloud auth/subscriptions and app function authorization/filter semantics. client, queries[collection].list/get/count, mutations[collection].create/update/delete; remote deploy URL, deployment admin key for function deployment, and a test identity if functions require auth. Local key generated and discarded by runner.
BigNumberDataAccessAdapter 実PostgreSQL合成+単体/real PostgreSQL composition and unit NUMERIC(30,10)の20桁整数+10桁小数とゼロ値を実DBで往復。 / Actual NUMERIC(30,10) precision round trip and zero values. 各DBとの全型組合せ。 / Every numeric type on each database. Wrapped adapter and numeric conversion configuration.

再現手順

ターミナルウィンドウ
# public/ root; Docker + Node >=24 + Bun 1.4.0
bun install --frozen-lockfile --ignore-scripts
bun run test:adapters:local
bun run test:containers

test:adapters:local はD1/Better AuthとSupabase・Mongo・Convex・コンテンツ合成を実行する。test:containers は加えて既存MinIO/PostgreSQL検証を実行する。TOOLS_TEST_CONTAINERS=1 bun run verify でも両方が必須になる。

ログは各所有パッケージまたはルートの.verification/logs/。固有Compose projectとloopback動的ポートを使い、テストデータ/コンテナ/一時ファイルはfinallyで削除。外部サービス用の設定はアプリへ渡す値であり、上記ローカルrunnerが自動的に外部へ接続する環境変数ではない。外部接続試験は専用の非本番リソースと本人の許可を用意し、成功証跡・対象版・未実施項目を追記する。

References: Miniflare D1, PostgREST, Convex self-hosting, Better Auth SQLite.