CodeSampleX

サンプル

drizzle-orm 0.45.2: Avoid silent WHERE clause stripping from empty combinators, unapplied casing on explicit columns, and timestamp precision truncation in drizzle-orm

検証済みサンプル — npm drizzle-orm 0.45.2: Avoid silent WHERE clause stripping from empty combinators, unapplied casing on explicit columns, and timestamp precision…

sha256:84a045eebca95d55e52c81ad4eec76d25ca85d1f28170b35ea0504aed4bf4978

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 node linux x64 node node npm

検証実行環境

環境 コントラクト ステージ 実行日
node 22 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-16
node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1
2026-08-18

ケース

HOW
ゴール
Avoid silent WHERE clause stripping from empty combinators, unapplied casing on explicit columns, and timestamp precision truncation in drizzle-orm
パッケージ
シンボル
  • inArray
  • notInArray
  • or
  • and
  • count
  • countDistinct
  • sqliteTable
  • integer
  • text
  • drizzle-orm/sqlite-proxy
  • SQLiteAsyncDialect
  • relations
環境
node
作成日
2026-08-16T06:23:34Z

コントラクト

  1. assert require('drizzle-orm/package.json') is forbidden by the exports map, requiring direct file reads
  2. assert inArray and notInArray with empty arrays fold cleanly to SQL false and true without syntax errors
  3. assert empty or() and and() evaluate to undefined and silently strip the WHERE clause instead of failing
  4. assert columns with explicit string names mark keyAsName false and bypass dialect casing rules
  5. assert sqlite-proxy 2-argument initialization silently drops dialect casing configuration
  6. assert SQLite integer mode 'timestamp' truncates Date milliseconds to seconds whereas 'timestamp_ms' preserves them
  7. assert count() attaches a Number decoder converting driver strings and bigints to JS numbers
  8. assert Relational Query Builder findFirst returns undefined on missing records and null on missing 1:1 relations

ファイル

  • NOTES.md
  • csx.json
  • package-lock.json
  • package.json
  • src/db.mjs
  • src/schema.mjs
  • test/contract.mjs

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed