{"_id":"ck-orm","_rev":"29-8fd84fb2609f55de86d1838837a795e7","name":"ck-orm","dist-tags":{"latest":"0.0.28"},"versions":{"0.0.1":{"name":"ck-orm","version":"0.0.1","author":"MunMunMiao","license":"MIT","_id":"ck-orm@0.0.1","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"dist":{"shasum":"683f09677d0af600881bf8333263efeb2530a99b","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.1.tgz","fileCount":6,"integrity":"sha512-nJxjjFcJ0zbnp4d/dwy3VJHPGxDsbg5c2onHiMJKtInJBzb4ZBoV+3uV7hCsy6b4B0AS4gcmOY9B4jgUvSIQ4w==","signatures":[{"sig":"MEYCIQCX1isb3T+xoSKIay+aK3UyKvykKGjhYWta6FYzpxDXuwIhAJfBpxlyoBDJMYvexKdZd7PGl3nJ9zaUBxQy26VrbMhz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":252487},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","shasum":"683f09677d0af600881bf8333263efeb2530a99b","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","_integrity":"sha512-nJxjjFcJ0zbnp4d/dwy3VJHPGxDsbg5c2onHiMJKtInJBzb4ZBoV+3uV7hCsy6b4B0AS4gcmOY9B4jgUvSIQ4w==","_npmVersion":"10.8.3","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"24.3.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.1_1776880710651_0.6001974153887999","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"ck-orm","version":"0.0.3","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.3","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"0e949388fb2a96a949bd79edbd0e6f276748563f","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.3.tgz","fileCount":6,"integrity":"sha512-CAnYdeKteDdgTVK4B5a+dRhuPWWScUOjTO1kLqunUQbcpi+dxNrWIVd5MI9MuFIqlAqMP/VVMvytksPbr0cb5Q==","signatures":[{"sig":"MEUCIQCYomHnapHYgaPvSSNDdBynmXNfaweAr6C4lUP6ZexxzQIgNQTZkUTBRKlPR1BoP8MyKNgR2RPNMOADlFb3shFeioM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":261194},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"7946506b79f805a25556ce9480a8e9b427548543","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.3_1776886118006_0.6374951261589441","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"ck-orm","version":"0.0.4","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.4","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"b993dd656b3025b0ecc39d275a8b1d4cc49d844c","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.4.tgz","fileCount":6,"integrity":"sha512-qjIwbX23daDMJ8CToldqHkKB9z/0t4kWApeHy4Sh5hH4LTUucdtaAsjRtH3BBy9xnH3mhMovOFFcbbCLRWmdBw==","signatures":[{"sig":"MEQCIH1tMlJcE/qGnYK9ZPNH8+BeyDaNc1dG9YuklihQL1n3AiBEj1hvM4rDroHZ7BkyCQipD6LBa5Vb3hn5wQoOGuE2aw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":262790},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"315529a681a81e31e729cba83d9d9eb1cc76bcf8","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.4_1776892835405_0.5063991536922641","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"ck-orm","version":"0.0.5","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.5","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"d301e5404e0d335299fdbc5d0e1b2680c797ea2f","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.5.tgz","fileCount":6,"integrity":"sha512-o9KQpWR7yqyuMCQA1mso8uqFJuTHPxDSaFx9iShZp1oeQLMwAe3M+sE44rWYGfAy6LrPzU1bOv3ai2wZaSygcg==","signatures":[{"sig":"MEUCIQDvWYo5pG5qWW5X9nh50PMMQXy3KVrPdaApT82MmiXBOwIgcGmdND5ka1OoFu3hhR2CRQs0fexZsRJSMT5/Czn3hO4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":272487},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"c9454e47bf01a4565002c0fae5189a7023ec914e","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.5_1776928318294_0.5182489933923686","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"ck-orm","version":"0.0.6","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.6","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"738aa1db3af7bd502f53a05d4ce0e3dfb2fd1364","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.6.tgz","fileCount":6,"integrity":"sha512-cVa16CQI1OHCKKhQEeGa2OVHie74tD5jKJjWzbssYpDPZGSTbrv84DqDf1bLk90MeuSUMCnVi0C8ttX/tTerEg==","signatures":[{"sig":"MEYCIQCF8HCxzdEZQhP51zaW8PZGeuBw5r+G0Oo8ApLKIT6L3AIhAIbCw5S6mTKqDT1R+Tw2qGUVvXbdsHHJEmDL236qP4F8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":278047},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"d72d6cfddc43d56cc349b76f0d7ce4e809472f43","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.6_1776935433482_0.13656961694677228","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"ck-orm","version":"0.0.7","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.7","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"e7e3e5f12ba147d64d375ca1ccbc7517b98e2857","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.7.tgz","fileCount":6,"integrity":"sha512-sVYbaOzarardJlqXIKe9ADg3Afv5YBuKy9xuLnJduGElSlPdII6kapzhuobdUf6OHMViT2QlDfZ/VpGo3yBh+A==","signatures":[{"sig":"MEQCIDzC7y6UTtdocliHMrqX/IpDwHJAX80YzC7JH1R2EkXnAiADZK0vruGLcESk8FpdmGlla3dEdAOJYmRTQRll5iqjQQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":286738},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"bcc41ef0bb0d8a9f3051c040928b2db08d177ccb","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.7_1776973092265_0.32763602221244703","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"ck-orm","version":"0.0.8","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.8","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"157394a9dcf94e1b6382e497fd5bae338608cbea","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.8.tgz","fileCount":6,"integrity":"sha512-EUs0QMpS0mv1Jr6XQoAa/Fe40rEeSNI/uBnPrTp0txRS5hG5FkOKeg0lSijQiFIKCRB8n2u1nvUPeaWZI3ocxw==","signatures":[{"sig":"MEYCIQCscgtSTGDiEyPI/EGxNNPLgspsWbfX3EVnF50F1EtzcgIhAK2MKFdWI6/KFfIGPFf/s+D3CK9XfycTyFPvGydMjHS1","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":304168},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"6eb0a33c37b41d009dc89509b262c60c4efde9a7","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.8_1776981497573_0.38125399949544647","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"ck-orm","version":"0.0.9","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.9","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"2753304e518f0a73fa7b64332ff1cd84d4644135","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.9.tgz","fileCount":6,"integrity":"sha512-PISqq3kI9h4rmn3M4rNB6BdNJC6C3TcO1usUW9Z8QCIIXXoB9IkJCMPbg7VtEX6HBBgvyPD3TOViLoJRMNASEg==","signatures":[{"sig":"MEQCIDTKTRRvvgrwiT9PfXpyiuymNgSQBJDwG8TEcWOktvPvAiBbTLKD+PioA/1JdtXSXcjj20WU2uhp+M2HARL9zqa7AQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":320575},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"7a2d2465d5bb8ff1032e0043bd6143ce3637ebc7","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.9_1777015617542_0.6348313181562122","host":"s3://npm-registry-packages-npm-production"}},"0.0.10":{"name":"ck-orm","version":"0.0.10","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.10","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"3233a1e9fd2074904345171a527d4483805dd02f","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.10.tgz","fileCount":6,"integrity":"sha512-XZDzFfms7vgxWVqQZweqisGtcGwR4EdNtsurBfC7SZUbXpL8FbgXUNvPs+SfsBEREEz+/LWuxIOcb86oTZBVQg==","signatures":[{"sig":"MEYCIQDYB7ygz3CFkOsG92Aj68znYsXymV71/cJ0TqQolgcTBQIhAMt6Dsvkd0fkwGeTwqV+B09OQc3jwhosohSmR7ZjGkMq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":396762},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"9a77232b8ae508c4aca91210ab0f586ed128e597","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.10_1777044055341_0.8393279720620721","host":"s3://npm-registry-packages-npm-production"}},"0.0.11":{"name":"ck-orm","version":"0.0.11","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.11","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"970e71068cf7f1f02533149239e917f890e017b6","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.11.tgz","fileCount":6,"integrity":"sha512-wbXYnyl8wCIrMPLs3NTnafjmf5MCtndyPbznIb272j+Vi06onIT7CfnEo8FWuykzG1fgxkmqsDFaclOgTWN7ew==","signatures":[{"sig":"MEYCIQC8d0oOncOCnrbK9l1sPT6JSKY8JQuZfdt5ELedYmI7gwIhAOx+jEFh2rS9vUynBGH1h7v/ZwCg0JZCFI1fbGg3RBx7","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":428691},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"4c12051379fe77cd6a7233f2a2f584d07241a7e8","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.11_1777366663979_0.7932985192571462","host":"s3://npm-registry-packages-npm-production"}},"0.0.12":{"name":"ck-orm","version":"0.0.12","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.12","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"344c13076806058b175efd9db2c30e524e6cdcca","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.12.tgz","fileCount":6,"integrity":"sha512-bulSy3DStG4pk1euUGZa4qegK4dm0iWJWaCyGJ2ud549U1WudNPxh8sAFHfvNKhobveLGG1NZXWFpZrA333j+Q==","signatures":[{"sig":"MEQCIGZWu+LXHzf7RLahQm0ZVKbQPV7vO7EUZ1LE5LCjRZJeAiBpGyZGkP8WZEyNNpokMSbJfmvgF4NCOocuuAdFEXDz/w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":430858},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"cb3b45ce04d6722a6b22280821febf8e9b2e3de8","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.12_1777373480385_0.63730826121865","host":"s3://npm-registry-packages-npm-production"}},"0.0.13":{"name":"ck-orm","version":"0.0.13","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.13","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"e2a812843a100967d1f5e67dfcb63be36d1e4d83","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.13.tgz","fileCount":6,"integrity":"sha512-Dt1C1Phh+1g29n1kJ1gjjIuzn+btaFpdq+L7HxcK1egDBJHjAJGLbaNTIAXXgnoxZaBXzsyPM696AoTYOdd5ig==","signatures":[{"sig":"MEUCIAJl+3Yt9InW5Fu6n13lCSY6JYmeVQpD02Vwc7ELyC5mAiEAz6SZgdNXlcxbmFiYjhFIWD7vegFO1yWK88gA5z6BJaY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":442885},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"84687c1b9f9eb47b2c419fd4868e5728eb3dfef2","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.13_1777392787454_0.300816800095534","host":"s3://npm-registry-packages-npm-production"}},"0.0.14":{"name":"ck-orm","version":"0.0.14","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.14","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"ae7f1ad7911be333c0e1074fbce10f2832169446","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.14.tgz","fileCount":6,"integrity":"sha512-Rz+a0DogivBHAI43KsXsvdllOjHK0WRQQPbC881CWj3yZhyoM3ldqIP6j4Q9KmZCs6sQ90hTdOWFICmgq+pdTQ==","signatures":[{"sig":"MEUCICKk/LmcsQE0dOT1ZSO8v1pmHv1dEEICnq82mHaTIsvrAiEA0X3zFIdSPUZ48lD8XNk/QuiCjGRLN9B/eknp4fy7NgA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":442965},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"015b4768b3233878f86e66d4c78e35a74bd3bd62","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.14_1778003482180_0.312819451976047","host":"s3://npm-registry-packages-npm-production"}},"0.0.15":{"name":"ck-orm","version":"0.0.15","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.15","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"79490c1da120747352e48cfe27f519e581c4768d","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.15.tgz","fileCount":6,"integrity":"sha512-fIK8yDouhMce3p7tizUUkcFe52kwrTCpKJpc0sGnZykvwGQdy7Tybrfs0dQlivTF4/xS9VMsIN/+eovhF8mnDg==","signatures":[{"sig":"MEQCIGvZ/0lo9jr3Tw5q2+40G2I/8SEwUG0e0316nW4Sp3fFAiBpFQhCDS6iawZrlJ61QyJgYIbfjf9NJ9Eltl5iv7fhWg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":442712},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"3d8508e8118309ce053dd6297f3f5dec8216a187","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.15_1778008414440_0.3649540044718622","host":"s3://npm-registry-packages-npm-production"}},"0.0.16":{"name":"ck-orm","version":"0.0.16","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.16","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"0bac225843aa2b3ce4b75579ebb0545e7c81df3b","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.16.tgz","fileCount":6,"integrity":"sha512-jScHGIfmPXOle17E75CR9io/vhXufXtNAcM5XMbz5zzK8q9BNZ5yWAJpg9qIdaevIu2UT83qQUxKYYSrAFHAqQ==","signatures":[{"sig":"MEQCIDYgfFL+nOhbJmQftcHgpshT3+MY5hnCXI/B0RgXgPN4AiB0OYjMopkFHGRw9BrQebv6YMX6Dlmi796mjAnF2N+sKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":442738},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"aa368735dc25236bea84259624f86b03289bed3c","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.16_1778009346308_0.11055739944082288","host":"s3://npm-registry-packages-npm-production"}},"0.0.17":{"name":"ck-orm","version":"0.0.17","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.17","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"61cf44242869bd928f4d657bbac73cb53372d159","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.17.tgz","fileCount":6,"integrity":"sha512-pRdeM3UfcaTZB7bbM6JLIiAhzknWCU1lf0XMDkFinWeuXOchTrsNEe2/pAVxtItASl0EK42vCHmG1+I4yfFlmw==","signatures":[{"sig":"MEYCIQCeGv41035VQKh6ghepCE0p9ob6HjWxf7+BuO9uTTs3ZgIhAJs1HEsxGKAHyKp3dmALkncSNR4Bh83FexDKdlaF6eiT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":444974},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"18dcd9ad9379d7a9ed71443c837bbadf11959085","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.17_1778013850452_0.739178011870465","host":"s3://npm-registry-packages-npm-production"}},"0.0.18":{"name":"ck-orm","version":"0.0.18","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.18","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"e2842c58c2d56a605178db0b038d94b4b4f94c66","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.18.tgz","fileCount":6,"integrity":"sha512-5j+gr87OSWEr8IS+SFleuGHZDjWN/E6P7AvjLs9OHtwxAttqXfq8HTDq6H7WCwKw72wjhdGetVbdHvdLocohZA==","signatures":[{"sig":"MEQCIB7cD3Noa073yRG7XeGIXwOOUJwRGO0YFoDg++ntwDPBAiBv9eoBxtadrbMWKG8Im3+hjEMnC8Do6QW/uK3U8Dk4Gg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":553362},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"479ba422d4a137dacff8a46ebe7ea93a75c96fbc","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.18_1778125542143_0.9035968531905749","host":"s3://npm-registry-packages-npm-production"}},"0.0.19":{"name":"ck-orm","version":"0.0.19","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.19","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"e6dfddab34abae81b31707ea3c5d2f83990a180d","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.19.tgz","fileCount":6,"integrity":"sha512-7rhhavCPTwZ8QsA5UoluqcRYrYOs2rYbb0g4mq54bf585fSU8MBVVclPYvqy5pV7Z712ee1rfe/nHLb94WgV8w==","signatures":[{"sig":"MEUCIQDmVxN7HXcRTMPClqQlCF3XjeiPX4U1aWxTDOa0AI6/9gIgVoGuZE0WE4An+5ag+kDq+NTkr0PvrUcPqYTtkJLnP6M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555043},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"0988fc19e8c101451227ebf919b1d07a1339376c","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"25.9.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.19_1778145245768_0.5666977458252775","host":"s3://npm-registry-packages-npm-production"}},"0.0.20":{"name":"ck-orm","version":"0.0.20","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.20","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"e29f805094026555a0eab8ca0c4012d6df4bae38","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.20.tgz","fileCount":6,"integrity":"sha512-2GYn/Wd4Yp1Zp6gi7XHBBToxAk6yzmsHLrQeM5sUXWPmCrE0GE0fbYSWq9s1/o8HZ9p/sA6H1wQkTMP4iWBJVA==","signatures":[{"sig":"MEQCIA61uRAAgEjPRKVzZa/3VAbU7Gk/TSshg9QAKUcXhx9/AiAbJp2JN1yPe7iaC/8mI2zpbP65H0FgzX/PPfDhjPTzzw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":567354},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"a46e29b9741ef43eb0b181915c3cdfa3cdc4d783","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.20_1778518798404_0.6461671186570506","host":"s3://npm-registry-packages-npm-production"}},"0.0.21":{"name":"ck-orm","version":"0.0.21","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.21","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"64d5bafb004aa058f2838851c297218270c3f6b4","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.21.tgz","fileCount":6,"integrity":"sha512-3fAg6QugQakDBwpXAIDwniF7GsqUpS8voqvBP+rf+z3fnV6xPO4ge3Drr2iPk0ZnrxDXNQd3pRGOnpXx9PpytA==","signatures":[{"sig":"MEQCIBVi/qnxw5tGIxGPk6nK28YwkUr3NXbDoUka/87GI63NAiAbIsppFVyYAI7wdWSWb/Me6ScxQwBHfPfVjsuwAzSfkg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":602489},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"c48896e8c4252d528122efec2c5164c0e2675176","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.21_1778530473671_0.8720702923234542","host":"s3://npm-registry-packages-npm-production"}},"0.0.22":{"name":"ck-orm","version":"0.0.22","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.22","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"09928e6ede52add6e198cb4928b19acb26550b88","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.22.tgz","fileCount":6,"integrity":"sha512-w7ikO6+lkQk3ERSOA6KM2Crp8rUeLeSWXW+oQuYC2/7h6/3Pyd729SJLadGriGqZ1yRjNROTz7Y9xxU6RjNRgQ==","signatures":[{"sig":"MEUCIQCQOfaKlsV7pj+Zs3sf75zkIsaYrqESmD6bBjpbwlhshgIgW01jbf1N6noEq1gEsJ3WWA/zxnhUtyr2Z6/lzRy3Xak=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":613045},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"586ba7f8634d6b4c04c0dcb5bec8acddb547c89a","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.22_1778538260299_0.6642290084483313","host":"s3://npm-registry-packages-npm-production"}},"0.0.23":{"name":"ck-orm","version":"0.0.23","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.23","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"34677ec08264640402a00cbc22d4515ae21c825f","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.23.tgz","fileCount":6,"integrity":"sha512-zW9+uQlqK6RIWVoRFpPqKrCnj7/gRK0ZFglJ/9gRZu5c5504b3CfuGyhxpLv4MJLHzRcfFoHHKTAvU+4GiwEtw==","signatures":[{"sig":"MEUCIF9TUip4xEYRuj8Qv2f2S9kxvNssNQ5Abml/cr66rOBGAiEA6lUHP6ETNO1ZgFLix9bX2I5CuOpoP1f+LJDfTNnJi34=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":644673},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"f59d233add1357dc4069b4288fcdbbbb24a9cb19","typings":"./index.d.ts","_npmUser":{"name":"danni6","email":"wunonglin@gmail.com"},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.12.1","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"26.0.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.23_1778592944698_0.5128340430784004","host":"s3://npm-registry-packages-npm-production"}},"0.0.24":{"name":"ck-orm","version":"0.0.24","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.24","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"1f87a4b7dba3c4c34b62b30b74b11c95d854ff6e","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.24.tgz","fileCount":6,"integrity":"sha512-9hYh8p2I5I3t/+W8BWR1kh3uVvjQsLALoGceSLMk+A6o3p84WXUZPMfkn+2KGMdZeaY++TcyFR58wr/Pm96fQQ==","signatures":[{"sig":"MEUCIEM6Amc6K0fbxBVNUCa1RZnTWseTdGBA/4aaOJ/IAC7CAiEA8T0EWJXcLndoQw4JdtgSPMx5J7VgN4X3SQVDrvj2+sI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ck-orm@0.0.24","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":644691},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"60ce2251c541118ed8912ca232491f91a732be30","typings":"./index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1259b30a-65e9-4f5b-a3f0-d57053bb1ad4"}},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.16.0","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.24_1783791058825_0.06540087791926275","host":"s3://npm-registry-packages-npm-production"}},"0.0.25":{"name":"ck-orm","version":"0.0.25","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.25","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"0ba8c02b51ba082b4220ef1e3dc8d9f2534184b9","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.25.tgz","fileCount":6,"integrity":"sha512-PWr5s1fAOk8MDBGAsNuCkhU8S5+vT/kk1uLb3VnJyUxyytEZGqUMhtAJY0VnM4qXWIJZuJ0O9C2GWshEgGC97g==","signatures":[{"sig":"MEUCIGbVtK0nS68x7rMzru9G45xkaHYBisLWa7VO3wLzhFZUAiEAiYfbxqoTiNQL5P0RrCsUMyiTXrtPN4Bx4D1YRE1CFhA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ck-orm@0.0.25","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":654464},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"16559e20d3f68d6b31e6ebbf03c860f15e65589e","typings":"./index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1259b30a-65e9-4f5b-a3f0-d57053bb1ad4"}},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.16.0","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.25_1783809144611_0.7550439085080798","host":"s3://npm-registry-packages-npm-production"}},"0.0.26":{"name":"ck-orm","version":"0.0.26","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.26","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"6c9a4ed6822c8a0c195648660a7b1b95975628ca","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.26.tgz","fileCount":6,"integrity":"sha512-rzEvfRRy3/cjl5UhuPFjYPsrJ3T3BGMMK55qdXIiz4rSoDEwHqioNGuV5lMtb2LyRe6a79IrxYwx8376uvDUSA==","signatures":[{"sig":"MEUCIQDkn1Os/ItOEO89c84Eg2Pp1C0O78E9tjy1UDqO8igIMQIgGxxhrSxjEo40nE1WRQthiY4DsUf0EGXBVsEOwyGUNbg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ck-orm@0.0.26","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":656286},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"219e1dddbc78a2f5ca2877f36d293abb5fa630fd","typings":"./index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1259b30a-65e9-4f5b-a3f0-d57053bb1ad4"}},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.16.0","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.26_1783846639797_0.18008661648531987","host":"s3://npm-registry-packages-npm-production"}},"0.0.27":{"name":"ck-orm","version":"0.0.27","author":{"name":"MunMunMiao"},"license":"MIT","_id":"ck-orm@0.0.27","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"homepage":"https://github.com/MunMunMiao/ck-orm#readme","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"dist":{"shasum":"726c4a688f11ada89d9d24041f92ca1c12225365","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.27.tgz","fileCount":6,"integrity":"sha512-O5hlrvNDfjxSs5TGhBZuzPMsRR2g4flY9f1VQ/YF8fRmEd0jeJ3nV0KStbfDC8F/qVq7PwQsy/ptqaHHLvbH/A==","signatures":[{"sig":"MEUCIGQgNU4vCUfIP8Dfe/vBNpfwHeRdinNNIQoiRqzNtChEAiEAutl0AgWZWTe6lPtyzsbP96JjgrC2BDg6M+w3BS12+9A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ck-orm@0.0.27","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":659803},"main":"./index.js","type":"module","types":"./index.d.ts","unpkg":"./index.min.js","module":"./index.js","exports":{".":{"types":"./index.d.ts","default":"./index.js"},"./package.json":"./package.json"},"gitHead":"296cf0461ebfcc3d85fe39d469c29f69276a20c7","typings":"./index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1259b30a-65e9-4f5b-a3f0-d57053bb1ad4"}},"jsdelivr":"./index.min.js","repository":{"url":"git+https://github.com/MunMunMiao/ck-orm.git","type":"git"},"_npmVersion":"11.16.0","description":"ClickHouse ORM for modern JS runtimes","directories":{},"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"_npmOperationalInternal":{"tmp":"tmp/ck-orm_0.0.27_1784012443960_0.3746390699339408","host":"s3://npm-registry-packages-npm-production"}},"0.0.28":{"name":"ck-orm","version":"0.0.28","type":"module","main":"./index.js","types":"./index.d.ts","description":"ClickHouse ORM for modern JS runtimes","author":{"name":"MunMunMiao"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/MunMunMiao/ck-orm.git"},"peerDependencies":{"@opentelemetry/api":"^1.9.1"},"module":"./index.js","typings":"./index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./index.d.ts","default":"./index.js"}},"unpkg":"./index.min.js","jsdelivr":"./index.min.js","gitHead":"c80fb8ec115803edfdb8eb5ffc85700be833b604","_id":"ck-orm@0.0.28","bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"homepage":"https://github.com/MunMunMiao/ck-orm#readme","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-2U2vEiQQudOfOLeddGYwGbzPRqUxnoQMnKkBR1eAOWClJNa7k4xM0xRqBBQXDHTZR+fcGLfxxVKRRAPWu6V2KA==","shasum":"6f67d7a2047952279fbf2a97bb8d88dc2e736f8f","tarball":"https://registry.npmjs.org/ck-orm/-/ck-orm-0.0.28.tgz","fileCount":6,"unpackedSize":660798,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/ck-orm@0.0.28","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHRKV7rhD4i7fDJA1JgiIjIFsr/MX7ffeXyn3RNJADqQIhALnWSQmfGOYkapUWWEXqiBeWfqH8VcwgSPY4CRVwsmat"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:1259b30a-65e9-4f5b-a3f0-d57053bb1ad4"}},"directories":{},"maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ck-orm_0.0.28_1787835159218_0.13709070050745042"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T17:58:30.504Z","modified":"2026-08-27T12:52:39.712Z","0.0.1":"2026-04-22T17:58:30.805Z","0.0.2":"2026-04-22T19:12:24.799Z","0.0.3":"2026-04-22T19:28:38.218Z","0.0.4":"2026-04-22T21:20:35.554Z","0.0.5":"2026-04-23T07:11:58.435Z","0.0.6":"2026-04-23T09:10:33.621Z","0.0.7":"2026-04-23T19:38:12.405Z","0.0.8":"2026-04-23T21:58:17.741Z","0.0.9":"2026-04-24T07:26:57.698Z","0.0.10":"2026-04-24T15:20:55.486Z","0.0.11":"2026-04-28T08:57:44.187Z","0.0.12":"2026-04-28T10:51:20.573Z","0.0.13":"2026-04-28T16:13:07.614Z","0.0.14":"2026-05-05T17:51:22.345Z","0.0.15":"2026-05-05T19:13:34.610Z","0.0.16":"2026-05-05T19:29:06.460Z","0.0.17":"2026-05-05T20:44:10.596Z","0.0.18":"2026-05-07T03:45:42.328Z","0.0.19":"2026-05-07T09:14:05.934Z","0.0.20":"2026-05-11T16:59:58.662Z","0.0.21":"2026-05-11T20:14:33.850Z","0.0.22":"2026-05-11T22:24:20.536Z","0.0.23":"2026-05-12T13:35:44.884Z","0.0.24":"2026-07-11T17:30:59.001Z","0.0.25":"2026-07-11T22:32:24.789Z","0.0.26":"2026-07-12T08:57:19.944Z","0.0.27":"2026-07-14T07:00:44.160Z","0.0.28":"2026-08-27T12:52:39.348Z"},"bugs":{"url":"https://github.com/MunMunMiao/ck-orm/issues"},"author":{"name":"MunMunMiao"},"license":"MIT","homepage":"https://github.com/MunMunMiao/ck-orm#readme","repository":{"type":"git","url":"git+https://github.com/MunMunMiao/ck-orm.git"},"description":"ClickHouse ORM for modern JS runtimes","maintainers":[{"name":"danni6","email":"wunonglin@gmail.com"}],"readme":"## ⚠️ Before version 0.1.0, there will be significant API adjustments. If needed, please pin the version number.\n\n\n# CK-ORM\n\n<p align=\"center\">\n  <img src=\"bunner.png\" alt=\"ck-orm - TypeScript ORM for ClickHouse\" width=\"100%\" />\n</p>\n\n<p align=\"center\">\n  <a href=\"https://npmjs.com/package/ck-orm\"><img src=\"https://img.shields.io/npm/v/ck-orm?style=flat-square&labelColor=%23151A1F&color=%23151A1F\" alt=\"npm package\"></a>\n  <a href=\"https://npmjs.com/package/ck-orm\"><img src=\"https://img.shields.io/npm/dm/ck-orm?style=flat-square&labelColor=%23151A1F&color=%23151A1F\" alt=\"monthly downloads\"></a>\n  <a href=\"https://github.com/MunMunMiao/ck-orm/actions/workflows/ci.yml\"><img src=\"https://img.shields.io/github/actions/workflow/status/MunMunMiao/ck-orm/ci.yml?branch=main&style=flat-square&labelColor=%23151A1F&color=%23151A1F\" alt=\"build status\"></a>\n  <a href=\"https://github.com/MunMunMiao/ck-orm/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/MunMunMiao/ck-orm?style=flat-square&labelColor=%23151A1F&color=%23151A1F\" alt=\"license\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://deepwiki.com/MunMunMiao/ck-orm\"><img src=\"https://img.shields.io/badge/Ask_DeepWiki-151A1F?style=flat-square&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAzMiAzMic%2BPGcgZmlsbD0nI0Y4QzAwMCc%2BPGNpcmNsZSBjeD0nNi41JyBjeT0nMTYnIHI9JzUuMjUnLz48Y2lyY2xlIGN4PScxMS41JyBjeT0nOScgcj0nNScgb3BhY2l0eT0nLjg0Jy8%2BPGNpcmNsZSBjeD0nMjAnIGN5PSc3LjUnIHI9JzUnIG9wYWNpdHk9Jy43MicvPjxjaXJjbGUgY3g9JzI1LjUnIGN5PScxMy41JyByPSc1JyBvcGFjaXR5PScuODgnLz48Y2lyY2xlIGN4PScxNC41JyBjeT0nMTYuNScgcj0nNS4yNScvPjxjaXJjbGUgY3g9JzknIGN5PScyNCcgcj0nNScgb3BhY2l0eT0nLjc4Jy8%2BPGNpcmNsZSBjeD0nMTguNScgY3k9JzIzLjUnIHI9JzUnIG9wYWNpdHk9Jy44MicvPjxjaXJjbGUgY3g9JzI0JyBjeT0nMTknIHI9JzUnIG9wYWNpdHk9Jy43NCcvPjwvZz48L3N2Zz4%3D\" alt=\"Ask DeepWiki\"></a>\n</p>\n\n<p align=\"center\">\n  A typed ClickHouse query layer for modern JavaScript runtimes.\n</p>\n\nIt gives you:\n\n- a schema DSL for ClickHouse tables and columns\n- a typed query builder for the common path\n- raw SQL when ClickHouse-specific syntax is the better tool\n- session helpers for temporary-table workflows\n- observability hooks for logging, tracing, and custom instrumentation\n\nThe design goal is straightforward: make everyday ClickHouse access easier to structure without hiding the parts that make ClickHouse different.\n\n## Contents\n\n- [Installation](#installation)\n- [Quick start](#quick-start)\n- [Examples](#examples)\n- [Mental model](#mental-model)\n- [Schema DSL](#schema-dsl)\n- [Client configuration](#client-configuration)\n- [Query builder](#query-builder)\n- [Join null semantics](#join-null-semantics)\n- [Writes](#writes)\n- [Raw SQL](#raw-sql)\n- [Window expressions](#window-expressions)\n- [Functions and table functions](#functions-and-table-functions)\n- [Sessions and temporary tables](#sessions-and-temporary-tables)\n- [Runtime methods](#runtime-methods)\n- [Observability](#observability)\n- [Error model](#error-model)\n- [Security](#security)\n\n## Installation\n\n```bash\nbun add ck-orm\n```\n\n```bash\nnpm install ck-orm\n```\n\n## Quick start\n\nThe examples below use a single table so the main flow stays easy to follow.\n\n### 1. Define a schema\n\n```ts\nimport { ckTable, ckType } from \"ck-orm\";\n\nexport const probeTelemetry = ckTable(\n  \"probe_telemetry\",\n  {\n    id: ckType.int32(),\n    probeId: ckType.string(\"probe_id\"),\n    missionId: ckType.int32(\"mission_id\"),\n    sampleId: ckType.int64(\"sample_id\"),\n    signalStrength: ckType.decimal(\"signal_strength\", { precision: 20, scale: 5 }),\n    status: ckType.int16(),\n    createdAt: ckType.int32(\"created_at\"),\n    deletedAt: ckType.nullable(\n      \"deleted_at\",\n      ckType.dateTime64({ precision: 3, timezone: \"UTC\" }),\n    ),\n    ingestedAt: ckType.dateTime64(\"_ingested_at\", { precision: 9 }),\n    isDeleted: ckType.uint8(\"_is_deleted\"),\n    ingestVersion: ckType.uint64(\"_ingest_version\"),\n  },\n  (table) => ({\n    engine: \"ReplacingMergeTree\",\n    orderBy: [table.probeId, table.createdAt, table.id],\n    versionColumn: table.ingestVersion,\n  }),\n);\n```\n\n### 2. Create a client\n\n```ts\nimport { clickhouseClient } from \"ck-orm\";\n\nexport const db = clickhouseClient({\n  host: \"http://127.0.0.1:8123\",\n  database: \"telemetry_lab\",\n  username: \"default\",\n  password: \"<password>\",\n  clickhouse_settings: {\n    allow_experimental_correlated_subqueries: 1,\n    max_execution_time: 10,\n  },\n});\n```\n\n### 3. Query data\n\n```ts\nimport { ck, fn } from \"ck-orm\";\nimport { db } from \"./db\";\nimport { probeTelemetry } from \"./schema\";\n\nconst query = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    totalSignalStrength: fn.sum(probeTelemetry.signalStrength).as(\n      \"total_signal_strength\",\n    ),\n  })\n  .from(probeTelemetry)\n  .where(ck.eq(probeTelemetry.status, 1))\n  .groupBy(probeTelemetry.probeId)\n  .orderBy(ck.desc(fn.sum(probeTelemetry.signalStrength)))\n  .limit(20);\n\nconst rows = await query;\n```\n\nBuilder queries are thenable, so `await query` executes the query directly.\n\n`fn.sum` over a `Decimal` column auto-casts to `Decimal(P, S)` and returns `string` to keep precision intact — see [Decimal precision in expressions](#decimal-precision-in-expressions).\n\n## Examples\n\nThe README is the reference path for API examples. Runnable ClickHouse coverage lives in [`e2e/`](./e2e), including production-shaped scenario schemas in [`e2e/scenarios.ts`](./e2e/scenarios.ts).\n\n## Mental model\n\nUse `ck-orm` with these boundaries in mind:\n\n- `ckType.*` defines schema column types\n- `ckTable(...)` defines table schemas\n- `ck.*` is the query-helper namespace\n- `fn.*` is the SQL function-helper namespace\n- schema describes tables and columns, not the database name\n- the database connection lives on `clickhouseClient(...)`\n- builder queries are the default path, with raw SQL available for ClickHouse-specific expressions\n- `runInSession()` is a ClickHouse session helper, not a transaction\n- `leftJoin()` uses SQL-style null semantics by default\n- large or high-risk numeric results are decoded conservatively rather than silently coerced\n\n`ck-orm` focuses on typed ClickHouse access: table definitions, query composition, write helpers, session helpers, and observability. Production DDL and schema migration workflows remain in the migration tooling used by the application.\n\n## Schema DSL\n\n### `ckTable()`\n\nUse `ckTable(name, columns, options?)` to define a table.\n\nExamples in this section assume:\n\n```ts\nimport { ckTable, ckType, ckSql } from \"ck-orm\";\n```\n\n```ts\nconst probeTelemetry = ckTable(\"probe_telemetry\", {\n  id: ckType.int32(),\n  probeId: ckType.string(\"probe_id\"),\n  sampleId: ckType.int64(\"sample_id\"),\n  signalStrength: ckType.decimal(\"signal_strength\", { precision: 20, scale: 5 }),\n  createdAt: ckType.int32(\"created_at\"),\n  deletedAt: ckType.nullable(\n    \"deleted_at\",\n    ckType.dateTime64({ precision: 3, timezone: \"UTC\" }),\n  ),\n  ingestVersion: ckType.uint64(\"_ingest_version\"),\n});\n```\n\nThe third argument can be a plain object or a factory function:\n\n```ts\nconst probeTelemetry = ckTable(\n  \"probe_telemetry\",\n  {\n    id: ckType.int32(),\n    probeId: ckType.string(\"probe_id\"),\n    sampleId: ckType.int64(\"sample_id\"),\n    signalStrength: ckType.decimal(\"signal_strength\", { precision: 20, scale: 5 }),\n    createdAt: ckType.int32(\"created_at\"),\n    deletedAt: ckType.nullable(\n      \"deleted_at\",\n      ckType.dateTime64({ precision: 3, timezone: \"UTC\" }),\n    ),\n    ingestVersion: ckType.uint64(\"_ingest_version\"),\n  },\n  (table) => ({\n    engine: \"ReplacingMergeTree\",\n    orderBy: [table.probeId, table.createdAt, table.id],\n    versionColumn: table.ingestVersion,\n  }),\n);\n```\n\nPublic table options:\n\n- `engine`\n- `partitionBy`\n- `primaryKey`\n- `orderBy`\n- `sampleBy`\n- `ttl`\n- `settings`\n- `comment`\n- `versionColumn`\n\nColumn definitions can also carry DDL metadata directly:\n\n- `.default(expr)`\n- `.materialized(expr)`\n- `.aliasExpr(expr)`\n- `.comment(text)`\n- `.codec(expr)`\n- `.ttl(expr)`\n\nSchema metadata has two jobs in `ck-orm`:\n\n- it drives typed queries, insert validation, and result decoding\n- it can render structured DDL for session temporary tables\n\nIt does not automatically migrate or synchronize production ClickHouse tables. Keep production DDL in your migration tool, and keep `ckTable(...)` aligned with the schema your application reads and writes.\n\nExample:\n\n```ts\nconst probeTelemetry = ckTable(\n  \"probe_telemetry\",\n  {\n    id: ckType.int32(),\n    createdAt: ckType.dateTime(\"created_at\"),\n    shardDay: ckType.date(\"shard_day\").materialized(ckSql`toDate(created_at)`),\n    note: ckType.string().default(ckSql`'pending'`),\n  },\n  (table) => ({\n    engine: \"ReplacingMergeTree\",\n    partitionBy: ckSql`toYYYYMM(created_at)`,\n    orderBy: [table.id],\n    versionColumn: table.createdAt,\n  }),\n);\n```\n\n### Type inference\n\nEvery table exposes:\n\n- `table.$inferSelect`\n- `table.$inferInsert`\n\n```ts\ntype TelemetryRow = typeof probeTelemetry.$inferSelect;\ntype TelemetryInsert = typeof probeTelemetry.$inferInsert;\n\nconst sampleId: TelemetryRow[\"sampleId\"] = \"900001\";\nconst ingestVersion: TelemetryInsert[\"ingestVersion\"] = \"1\";\n```\n\nFor generic helpers, use:\n\n- `InferSelectModel<TTable>`\n- `InferInsertModel<TTable>`\n- `InferSelectSchema<TSchema>`\n- `InferInsertSchema<TSchema>`\n\n```ts\nimport type { InferInsertModel, InferSelectModel, InferSelectSchema } from \"ck-orm\";\n\ntype TelemetryRow = InferSelectModel<typeof probeTelemetry>;\ntype TelemetryInsert = InferInsertModel<typeof probeTelemetry>;\n\nconst telemetryTables = {\n  probeTelemetry,\n};\n\ntype TelemetryRows = InferSelectSchema<typeof telemetryTables>;\n```\n\nSchema objects used with `InferSelectSchema` and `InferInsertSchema` are plain TypeScript groupings. They are useful for shared model types and remain separate from client configuration.\n\n### Refining column types with `$type<T>()`\n\nEvery column builder exposes a chainable `$type<T>()` method that overrides the column's TypeScript type without changing any runtime behavior. Use it when the default inferred type is too wide for your domain:\n\n```ts\nimport { ckTable, ckType } from \"ck-orm\";\n\ntype UserId = number & { readonly __brand: \"UserId\" };\n\nconst users = ckTable(\"users\", {\n  id: ckType.int32().$type<UserId>(),\n  role: ckType.string().$type<\"guest\" | \"user\" | \"admin\">(),\n  preferences: ckType.json().$type<{ theme: \"light\" | \"dark\"; betaFeatures: readonly string[] }>(),\n});\n\ntype UserRow = typeof users.$inferSelect;\n// {\n//   id: UserId;\n//   role: \"guest\" | \"user\" | \"admin\";\n//   preferences: { theme: \"light\" | \"dark\"; betaFeatures: readonly string[] };\n// }\n```\n\n`$type<T>()` chains with every other column modifier in any order: `ckType.string().$type<Role>().default(ckSql`'guest'`).comment(\"…\")`. The runtime decoder, encoder, SQL type, and DDL output are unaffected — `$type` is a compile-time assertion only.\n\n`enum8` and `enum16` already infer the literal union from the values object, so you only need `$type` to rebrand the union or align it with an external enum type:\n\n```ts\n// Inferred automatically — no `as const`, no explicit type arguments\nconst status = ckType.enum8({ active: 1, paused: 2, banned: 3 });\n//    ↑ Enum8<\"active\" | \"paused\" | \"banned\">\n\n// Re-brand on top of the inferred keys\ntype UserStatus = \"active\" | \"paused\" | \"banned\";\nconst userStatus = ckType.enum8({ active: 1, paused: 2, banned: 3 }).$type<UserStatus>();\n```\n\n> **Caveat:** `$type<T>()` does not validate runtime values. If the database row contains a value outside the declared type (e.g. stale data from before a schema migration), TypeScript will still narrow as if it matches — exhaustive `switch` statements will silently miss the case. Use `mapWith` in a projection if you need to enforce the value at read time, or `$validator()` below to enforce on every decode and encode.\n\n### Diverging insert and select types with `$type<{ select, insert }>()`\n\nClickHouse columns sometimes accept a wider type on insert than the value returned on select — for example a `DateTime` column accepts both `string` and `Date` on insert but always returns `Date` after decoding. Pass an object to `$type` to diverge the two:\n\n```ts\nconst events = ckTable(\"events\", {\n  id: ckType.int32(),\n  occurredAt: ckType.dateTime().$type<{ select: Date; insert: string | Date }>(),\n});\n\ntype EventSelect = typeof events.$inferSelect;\n// { id: number; occurredAt: Date }\n\ntype EventInsert = typeof events.$inferInsert;\n// { id: number; occurredAt: string | Date }\n```\n\n`$type<{ select: T }>()` (without `insert`) is equivalent to the single-generic `$type<T>()` form.\n\n### Insert model rules: DEFAULT, MATERIALIZED, ALIAS\n\n`$inferInsert` is derived from the schema's column shape, not just copied from `$inferSelect`:\n\n| DDL modifier | Effect on insert model |\n| --- | --- |\n| `.default(expr)` | Column becomes optional — omitting it lets ClickHouse fill the value |\n| `.materialized(expr)` | Column is removed from the insert model entirely |\n| `.aliasExpr(expr)` | Column is removed from the insert model entirely |\n\n```ts\nconst users = ckTable(\"users\", {\n  id: ckType.int32(),\n  name: ckType.string().default(ckSql`'anonymous'`),\n  computedAt: ckType.dateTime().materialized(ckSql`now()`),\n  derivedTag: ckType.string().aliasExpr(ckSql`upper(name)`),\n});\n\n// id is required; name is optional (has default); computedAt/derivedTag are\n// not part of $inferInsert at all.\ndb.insert(users).values({ id: 1 });\ndb.insert(users).values({ id: 2, name: \"alice\" });\n```\n\n### Runtime validation with `$validator(schema)`\n\nFor cases where `$type` is not enough — the database might contain stale data, you accept JSON shapes from untrusted upstreams, or you want the insert API to coerce a string into a `Date` — chain `$validator(schema)` instead. Any object that satisfies the [Standard Schema v1 spec](https://github.com/standard-schema/standard-schema) works: Zod 3.23+, Valibot 1+, ArkType, Effect Schema, TypeBox. ck-orm does not depend on any of these libraries.\n\n```ts\nimport { z } from \"zod\";\n\nconst ProfileSchema = z.object({\n  avatarUrl: z.string().url(),\n  bio: z.string().optional(),\n});\n\nconst users = ckTable(\"users\", {\n  id: ckType.int32(),\n  profile: ckType.json().$validator(ProfileSchema),\n});\n\n// On select, the decoded JSON is run through the schema; on failure ck-orm\n// throws a DecodeError with the schema's issue messages.\nconst rows = await db.select().from(users).execute();\n//    rows[0].profile is typed as z.infer<typeof ProfileSchema>\n\n// On insert, the value is validated before being encoded; on failure ck-orm\n// throws a client_validation error.\nawait db.insert(users).values({ id: 1, profile: { avatarUrl: \"https://…\" } });\n```\n\nSchema transforms (e.g. `z.string().transform((v) => new Date(v))`) are respected — the column accepts the schema's *input* type on insert and surfaces the *output* type on select. `$validator` is sync-only: async schemas throw at decode/encode time.\n\n`$type` vs `$validator`:\n\n| | `$type<T>()` | `$validator(schema)` |\n| --- | --- | --- |\n| Runtime cost | Zero | One sync schema validate per row per column |\n| Type safety | Compile-time assertion | Inferred from the schema |\n| Runtime validation | No | Yes — throws on mismatch |\n| Input ≠ output types | Via `$type<{ select, insert }>()` | Via schema transforms |\n| External dependency | None | None (schema lib is your choice) |\n\n### JSON column type\n\nck-orm targets the ClickHouse 24.x+ **new-version JSON data type**\n([docs](https://clickhouse.com/docs/sql-reference/data-types/newjson)) — the\none that physically splits a JSON object into typed sub-columns rather than\nstoring the value as an opaque string. Two ground rules to keep in mind\nupfront:\n\n- ClickHouse's `JSON` data type accepts **only top-level objects**. Top-level\n  arrays, strings, and numbers are rejected. ck-orm enforces the same at\n  compile time via `T extends Record<string, unknown>` and at runtime via a\n  cheap O(1) check on every insert/select.\n- Typed paths (`a.b UInt32`) become real sub-columns inside ClickHouse; ck-orm\n  routes those paths through the corresponding ck-orm column factory's\n  `mapFromDriverValue` / `mapToDriverValue` so a path declared as\n  `ckType.uint64()` decodes to a lossless `string` exactly like the\n  top-level `uint64` column does.\n\nThe simplest form mirrors every other ck-orm column factory:\n\n```ts\nimport { ckTable, ckType } from \"ck-orm\";\n\nconst auditLogs = ckTable(\"audit_logs\", {\n  id: ckType.uint64(),\n  payload: ckType.json(\"payload\"),\n});\n// DDL:  `payload` JSON\n// $inferSelect.payload: { [key: string]: unknown }\n```\n\nPass a generic to surface the actual shape in `$inferSelect` /\n`$inferInsert`:\n\n```ts\ntype EventPayload = { user_id: number; event: string; meta?: { ip: string } };\n\nconst userEvents = ckTable(\"user_events\", {\n  id: ckType.uint64(),\n  payload: ckType.json<EventPayload>(\"payload\"),\n});\n```\n\n`ckType.json<T>().$type<T2>()` is the chainable equivalent if you prefer\nkeeping the generic next to other column-builder calls.\n\n#### Parameterized DDL\n\nThe second factory argument accepts the four NewJSON DDL knobs:\n\n```ts\nconst userEvents = ckTable(\"user_events\", {\n  id: ckType.uint64(),\n  payload: ckType.json<{\n    user_id: string;\n    created_at: Date;\n    user: { name: string; tier: number };\n  }>(\"payload\", {\n    maxDynamicPaths: 256,\n    maxDynamicTypes: 8,\n    typeHints: {\n      user_id: ckType.uint64(),\n      created_at: ckType.dateTime64({ precision: 3, timezone: \"UTC\" }),\n      \"user.tier\": ckType.uint32(),\n    },\n    skip: [\"debug\", \"internal\"],\n    skipRegexp: [\"^_tmp\"],\n  }),\n});\n\n// DDL:\n//   `payload` JSON(\n//     max_dynamic_paths=256,\n//     max_dynamic_types=8,\n//     created_at DateTime64(3, 'UTC'),\n//     user.tier UInt32,\n//     user_id UInt64,\n//     SKIP debug,\n//     SKIP internal,\n//     SKIP REGEXP '^_tmp'\n//   )\n```\n\n`typeHints` keys are type-checked against `Paths<T>` — typos like\n`{ \"user.idd\": ... }` fail at compile time. The rendered DDL is always\nemitted in a stable lexicographic order so external schema-diff tooling\nsees byte-identical output regardless of how the user wrote the config.\n\n#### typeHints affect the runtime decoder\n\nClickHouse's lossless 64-bit policy makes `UInt64` decode to a string in\nck-orm. If you declare `user_id` both in the TS shape *and* as a\n`typeHints` entry, keep the two in sync — for `uint64` that means writing\n`user_id: string` in the generic. Use `$type<{ select, insert }>()` when\nthe accepted insert input differs from the decoded select type:\n\n```ts\nckType.json(\"payload\", { typeHints: { user_id: ckType.uint64() } })\n  .$type<{\n    select: { user_id: string };\n    insert: { user_id: string | number | bigint };\n  }>();\n```\n\n#### Path access\n\nEvery JSON column carries five chainable path methods that render the\nClickHouse path-access syntax verbatim:\n\n| Method | SQL | Meaning |\n| --- | --- | --- |\n| `col.path(\"a.b\")` | `col.a.b` | Read a path; static type is `PathValue<T, \"a.b\">` (see note on `typeHints` below) |\n| `col.castPath(\"a.b\", ckType.uint64())` | `col.a.b.:UInt64` | Force-decode a path through a different ck-orm column factory; static type comes from the cast column's `TData` |\n| `col.subobject(\"a\")` | `col.^a` | Read a nested object as a `JSON` value |\n| `col.merged(\"a\")` | `col.@a` | Read the merged shared-data view |\n| `col.arrayPath(\"a\")` | `col.a[]` | Expand an array-typed path |\n\n> `col.path(P)` always types as `PathValue<T, P>` — it derives from the\n> generic `T`, not from `typeHints`. `typeHints` only changes the runtime\n> decoder; the static type and the typeHint must be kept in sync manually\n> (the section above explains the `uint64 → string` lossless policy). When\n> the two disagree, use `castPath(P, ckType.X())` instead — its return type\n> is sourced from the cast column.\n\n```ts\nimport { gt } from \"ck-orm\";\n\nconst recentVip = await db\n  .select({\n    id: userEvents.id,\n    uid: userEvents.payload.path(\"user_id\"),     // SQL: payload.user_id   type: string\n    when: userEvents.payload.path(\"created_at\"), // SQL: payload.created_at type: Date\n    tier: userEvents.payload.path(\"user.tier\"),  // SQL: payload.user.tier  type: number\n  })\n  .from(userEvents)\n  .where(gt(userEvents.payload.path(\"user.tier\"), 5))\n  .execute();\n```\n\n`Paths<T>` validates the path literal at compile time — `payload.path(\"a.zzz\")`\nfails to typecheck when `\"a.zzz\"` is not part of `T`.\n\nPath methods are re-attached at runtime by every chain modifier\n(`$type`, `$validator`, `.default()`, `.materialized()`, `.bind()`, …) so\nthe underlying call always works. **The static type tracks them through\nevery chain link except `$validator`**: `$validator`'s contract is generic\nover `StandardSchemaV1<unknown, unknown>`, which cannot be safely narrowed\nto `JsonShape` without violating the LSP-style subtype rules TypeScript\nenforces, so the static type erases back to `Column<T>` after that one\nlink. The method itself is still callable — just reach for a type\nassertion if you need to chain it further:\n\n```ts\nconst events = ckTable(\"events\", {\n  payload: ckType.json<{ a: number }>(\"payload\")\n    .$type<{ a: number; b: string }>()\n    .default(ckSql`'{}'`),\n});\n\n// Type and runtime both happy — JsonColumn shape preserved through\n// `$type` + `.default()`.\nawait db.select({ b: events.payload.path(\"b\") }).from(events).execute();\n```\n\n```ts\nconst validated = ckTable(\"validated\", {\n  payload: ckType.json<{ a: number }>(\"payload\").$validator(someSchema),\n});\n// Runtime works, but the static type lost `.path` after $validator —\n// cast to JsonColumn (or call through the validator's TData) to use it:\nconst col = validated.payload as unknown as JsonColumn<{ a: number }, \"validated\">;\nawait db.select({ a: col.path(\"a\") }).from(validated).execute();\n```\n\n#### `fn.json*` — dynamic-path call sites\n\nWhen the path string is built at runtime (or you want to read a path that\nisn't declared in `T`), reach for the `fn.*` namespace:\n\n```ts\nimport { fn } from \"ck-orm\";\n\nconst userPath = userInput as string;\nawait db.select({\n  raw:    fn.jsonPath<string>(userEvents.payload, userPath),\n  casted: fn.jsonCast(userEvents.payload, userPath, ckType.string()),\n  shape:  fn.dynamicType(fn.jsonPath(userEvents.payload, userPath)),\n});\n```\n\n`fn.jsonCast` is the dynamic equivalent of `castPath`; `fn.jsonSubobject`,\n`fn.jsonMerged`, and `fn.jsonArray` mirror their column-method\ncounterparts; `fn.dynamicType` exposes the ClickHouse `dynamicType()`\nfunction for inspecting the runtime kind of a Dynamic-typed path.\n\n#### Runtime validation\n\nTwo layers run on every row, **in this order**:\n\n1. **ck-orm's built-in JSON guard** — `null` / `undefined` pass through\n   unchanged so `nullable()` JSON columns work naturally; every other\n   non-object input (array, string, number, boolean) is rejected with a\n   column-scoped `client_validation` / `decode` error like\n   `JSON column expects a plain object, got array`. Typed paths from\n   `typeHints` are routed through their column-factory encoder/decoder on\n   the way in/out. Always on.\n2. **Optional `$validator(schema)`** — when present, runs *before* the\n   built-in encoder on insert and *after* the built-in decoder on select.\n   Use this for shape-level validation:\n\n   ```ts\n   import { z } from \"zod\";\n\n   const PayloadSchema = z.object({\n     user_id: z.string().min(1),\n     event: z.enum([\"login\", \"logout\", \"click\"]),\n   });\n\n   const events = ckTable(\"events\", {\n     payload: ckType\n       .json(\"payload\", { typeHints: { user_id: ckType.uint64() } })\n       .$validator(PayloadSchema),\n   });\n   ```\n\nck-orm intentionally **does not** recurse into the JSON value to check\nwhether `T[\"a\"]` is actually a `number` etc. Use `$validator` if you need\nthat — the JSON guard's job is only to catch the cases where ClickHouse's\nown error message would be hard to map back to a column. Top-level scalar\narguments fail loudly with the column name in scope:\n\n```ts\nawait db.insert(events).values({ payload: [\"wrong\"] as never });\n// throws: JSON column expects a plain object, got array\n```\n\n#### Insert defaults\n\nJSON columns participate in the same `$inferInsert` rules as every other\ncolumn. `.default()` makes the field optional; `.materialized()` /\n`.aliasExpr()` remove it from the insert model entirely:\n\n```ts\nconst auditLogs = ckTable(\"audit_logs\", {\n  id: ckType.uint64(),\n  payload: ckType.json<{ note: string }>(\"payload\").default(ckSql`'{}'`),\n});\n\nawait db.insert(auditLogs).values({ id: \"1\" }); // payload filled by CH DEFAULT\n```\n\n### `ckAlias()`\n\nUse `ckAlias()` when the same table needs to appear more than once in a query.\n\n```ts\nimport { fn, ck, ckAlias } from \"ck-orm\";\n\nconst telemetry = ckAlias(probeTelemetry, \"telemetry\");\n```\n\nColumns returned by `ckAlias()` are rebound automatically to the alias.\n\n### Column names\n\nThe schema object key is the logical key used by TypeScript rows, decoded query results, and insert values. By default, that same key is also the ClickHouse column name:\n\n```ts\nconst telemetry = ckTable(\"telemetry\", {\n  signalStrength: ckType.decimal({ precision: 20, scale: 5 }),\n});\n```\n\nWhen the database column uses a different name, pass that physical column name as the first argument:\n\n```ts\nconst telemetry = ckTable(\"telemetry\", {\n  probeId: ckType.string(\"probe_id\"),\n  signalStrength: ckType.decimal(\"signal_strength\", { precision: 20, scale: 5 }),\n  createdAt: ckType.dateTime64(\"created_at\", { precision: 9 }),\n});\n\nawait db.insert(telemetry).values({\n  probeId: \"probe_alpha\",\n  signalStrength: \"12.50000\",\n  createdAt: new Date(),\n});\n```\n\nSQL, DDL, filters, ordering, grouping, and write column lists use the physical names (`probe_id`, `signal_strength`, `created_at`). Inferred models, default select results, explicit projection keys, and insert values use the schema object keys (`probeId`, `signalStrength`, `createdAt`).\n\nEvery public `ckType` builder supports an outer physical column name. Builders without extra configuration accept `name?`; builders with type configuration keep the optional physical column name first and put the type configuration in an object:\n\n```ts\nconst typedColumns = ckTable(\"typed_columns\", {\n  id: ckType.int32(\"id\"),\n  code: ckType.fixedString(\"code\", { length: 8 }),\n  amount: ckType.decimal(\"amount\", { precision: 20, scale: 5 }),\n  tags: ckType.array(\"tags\", ckType.string()),\n  attrs: ckType.map(\"attrs\", ckType.string(), ckType.string()),\n  embedding: ckType.qbit(\"embedding\", ckType.float32(), { dimensions: 8 }),\n});\n```\n\n`aggregateFunction` and `simpleAggregateFunction` have a ClickHouse-specific call shape: the first string is the aggregate function name, not the column name:\n\n```ts\nckType.aggregateFunction(\"sum\", ckType.uint64());\nckType.aggregateFunction(\"quantile(0.5)\", ckType.float64());\nckType.simpleAggregateFunction(\"sum\", ckType.uint64());\n```\n\n`AggregateFunction` accepts ClickHouse aggregate names with literal parameters, such as `quantile(0.5)` or `topK(10)`. `simpleAggregateFunction` stays stricter and uses a plain aggregate function name.\n\nUse object config when you also need a physical column name:\n\n```ts\nconst aggregateStateColumns = ckTable(\"aggregate_state_columns\", {\n  signalSumState: ckType.aggregateFunction(\"signal_sum_state\", {\n    name: \"sum\",\n    args: [ckType.decimal({ precision: 20, scale: 5 })],\n  }),\n  signalSum: ckType.simpleAggregateFunction(\"signal_sum\", {\n    name: \"sum\",\n    value: ckType.decimal({ precision: 20, scale: 5 }),\n  }),\n});\n```\n\n`nested(\"items\", shape)` names the outer `Nested(...)` column. Nested field names are the keys of `shape`; inner column `configuredName` values are not used for the nested field names:\n\n```ts\nconst sensorPackets = ckTable(\"sensor_packets\", {\n  items: ckType.nested(\"items\", {\n    componentId: ckType.string(),\n    quantity: ckType.float64(),\n  }),\n});\n```\n\n### Column builders\n\nUse `ckType.*` for schema column builders. The schema DSL covers the common ClickHouse type families:\n\n- integers: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `uint32`, `uint64`\n- floating point and decimal: `float32`, `float64`, `bfloat16`, `decimal`\n- scalar types: `bool`, `string`, `fixedString`, `uuid`, `ipv4`, `ipv6`\n- time types: `date`, `date32`, `dateTime`, `dateTime64`, `time`, `time64`\n- enums and special types: `enum8`, `enum16`, `json`, `dynamic`, `qbit`\n- containers: `nullable`, `array`, `tuple`, `map`, `nested`, `variant`, `lowCardinality`\n- aggregate types: `aggregateFunction`, `simpleAggregateFunction`\n- geometry types: `point`, `ring`, `lineString`, `multiLineString`, `polygon`, `multiPolygon`\n\n`int64` and `uint64` default to TypeScript `string` in schema-driven reads, writes, and inferred models so 64-bit values stay exact across the ClickHouse JSON wire format and JavaScript runtimes. When you explicitly want `bigint`, opt in with your own decoder such as `mapWith((value) => BigInt(String(value)))`.\n\nClickHouse does not support `Nullable(Array(...))`, `Nullable(Map(...))`, or `Nullable(Tuple(...))`. `ck-orm` rejects those shapes at schema-definition time. Put `nullable(...)` inside the composite type instead, for example `ckType.array(ckType.nullable(ckType.string()))`.\n\nBuilders with type configuration use object config, with the optional physical column name first:\n\n```ts\nckType.decimal({ precision: 20, scale: 5 });\nckType.decimal(\"signal_strength\", { precision: 20, scale: 5 });\nckType.fixedString({ length: 8 });\nckType.date({ encode: \"utc\" });\nckType.date32(\"mission_day\", { encode: (date) => date.toISOString().slice(0, 10) });\nckType.dateTime64(\"created_at\", { precision: 9, timezone: \"UTC\" });\nckType.qbit(\"embedding\", ckType.float32(), { dimensions: 8 });\n```\n\n`Date` / `Date32` writes and schema-driven predicate values require an explicit encoder when the application passes a JavaScript `Date`. Use `\"utc\"`, `\"local\"`, or a custom `(date: Date) => \"YYYY-MM-DD\"` function. String values are accepted only when they already match a valid `YYYY-MM-DD` date. This keeps calendar-day semantics under the application schema instead of guessing from the runtime timezone.\n\n### Column Type Cookbook\n\nCommon schema shapes and their TypeScript values:\n\n| ClickHouse shape | Schema | TypeScript value shape |\n| --- | --- | --- |\n| enum | `ckType.enum8({ idle: 1, active: 2 })` | `\"idle\" | \"active\"` (inferred from keys) |\n| low-cardinality string | `ckType.lowCardinality(ckType.string())` | `string` |\n| nullable decimal | `ckType.nullable(ckType.decimal({ precision: 18, scale: 5 }))` | `string | null` |\n| array | `ckType.array(ckType.string())` | `string[]` |\n| nullable array item | `ckType.array(ckType.nullable(ckType.string()))` | `(string | null)[]` |\n| tuple | `ckType.tuple(ckType.string(), ckType.int32())` | `[string, number]` |\n| map | `ckType.map(ckType.string(), ckType.string())` | `Record<string, string>` |\n| nested object array | `ckType.nested({ component: ckType.string(), quantity: ckType.float64() })` | `{ component: string; quantity: number }[]` |\n| variant | `ckType.variant(ckType.string(), ckType.int32())` | `string | number` |\n| JSON | `ckType.json<{ risk?: { score?: number } }>()` | `{ risk?: { score?: number } }` |\n\n`ckType.map(...)` currently supports `String` keys only and maps them to a JavaScript record, so it does not model ClickHouse's duplicate-key `Map(K, V)` edge case.\n\nInsert rows use the same inferred shape as `typeof table.$inferInsert`, except columns with ClickHouse defaults or generated expressions can be omitted when you call `insert(table).values(...)`. `MATERIALIZED` and `ALIAS` columns are never written in the generated `INSERT` column list; passing them explicitly is rejected.\n\n## Client configuration\n\nCreate a client with `clickhouseClient()`:\n\n```ts\nconst db = clickhouseClient({\n  databaseUrl: \"http://default:<password>@127.0.0.1:8123/telemetry_lab\",\n});\n```\n\n### Connection modes\n\n`clickhouseClient()` supports two mutually exclusive connection styles.\n\n#### `databaseUrl`\n\nUse `databaseUrl` when you want a single connection string:\n\n```ts\nconst db = clickhouseClient({\n  databaseUrl: \"http://default:secret@127.0.0.1:8123/telemetry_lab\",\n});\n```\n\nWhen `databaseUrl` is present, do not also pass:\n\n- `host`\n- `database`\n- `username`\n- `password`\n- `pathname`\n\n#### Structured connection fields\n\nUse explicit fields when you want each part configured separately:\n\n```ts\nconst db = clickhouseClient({\n  host: \"http://127.0.0.1:8123\",\n  database: \"telemetry_lab\",\n  username: \"default\",\n  password: \"<password>\",\n});\n```\n\nStructured mode defaults:\n\n- `host`: `http://localhost:8123`\n- `database`: `default`\n- `username`: `default`\n- `password`: `\"\"`\n\n### Common fields\n\nMost projects only need a small subset of client fields:\n\n| Field | Purpose |\n| --- | --- |\n| `request_timeout` | Optional per-request wall-clock timeout in milliseconds. When omitted, ck-orm does not enforce any client-side timeout — request lifetime is controlled by the underlying fetch / platform / server / `abort_signal`. For long-running streaming queries, leave this unset and apply a wall-clock budget through `abort_signal` (e.g. `AbortSignal.timeout(30_000)`) instead. |\n| `clickhouse_settings` | Default ClickHouse session/query settings |\n| `application` | Set the ClickHouse application name |\n\nTable definitions are independent of connection configuration. Define tables with `ckTable(...)`, import those table objects where queries are composed, and pass them directly to `.from(...)`, `.insert(...)`, and temporary-table helpers.\n\n### Advanced fields\n\nUse these fields for advanced runtime behavior:\n\n| Field | Purpose |\n| --- | --- |\n| `fetch` | Fetch-compatible implementation used for every HTTP request; defaults to `globalThis.fetch` |\n| `http_headers` | Additional default headers |\n| `role` | Default ClickHouse role or roles |\n| `session_id` | Default session id |\n| `session_max_concurrent_requests` | Maximum in-flight requests allowed per `session_id` within this client (default `1`) |\n| `compression.response` | Request compressed responses |\n| `logger` / `logLevel` | Logger integration |\n| `tracing` | OpenTelemetry integration |\n| `instrumentation` | Custom query lifecycle hooks |\n\nSession lifetime controls are intentionally request-scoped. Pass `session_timeout` to a single query or to `runInSession(...)`. Use `session_check` when you are continuing an existing `session_id`, not when bootstrapping a brand-new session.\n`session_max_concurrent_requests` is different: it is a client-level guard that throttles overlapping requests that target the same `session_id`.\nReal ClickHouse sessions are still server-locked, so increasing `session_max_concurrent_requests` above `1` can surface `SESSION_IS_LOCKED` instead of giving you true same-session parallelism.\nKeep the default `1` unless you intentionally want to remove local serialization and are prepared to handle server-side session-lock failures.\n\n### ClickHouse settings\n\n`clickhouse_settings` is only for ClickHouse session/query settings, the same kind of keys documented in ClickHouse's [Session Settings](https://clickhouse.com/docs/operations/settings/settings) and accepted by the HTTP API as query parameters. It is separate from ck-orm client configuration such as `host`, `database`, `request_timeout`, `http_headers`, and `session_max_concurrent_requests`.\n\nKeep HTTP transport fields such as `query`, `database`, `session_id`, `role`, and `param_*` outside `clickhouse_settings`; ck-orm validates these keys separately because they belong to the request envelope and named-parameter channel.\n\nOfficial setting keys have TypeScript completion, and arbitrary keys remain valid for newer ClickHouse versions or deployment-specific settings:\n\n```ts\nimport { clickhouseClient, type ClickHouseSettings } from \"ck-orm\";\n\nconst labSettings: ClickHouseSettings = {\n  allow_experimental_correlated_subqueries: 1,\n  max_threads: 4,\n  setting_added_by_future_clickhouse: \"enabled\",\n};\n\nconst db = clickhouseClient({\n  host: \"http://127.0.0.1:8123\",\n  database: \"telemetry_lab\",\n  username: \"default\",\n  password: \"<password>\",\n  request_timeout: 30_000,\n  clickhouse_settings: labSettings,\n});\n```\n\nJSON parse/stringify behavior is managed by the fetch transport. The public client configuration keeps that behavior consistent across runtimes rather than exposing a `json` override.\n\nck-orm forces a small wire-contract settings set on every request: `http_write_exception_in_output_format = 0`, `output_format_json_quote_64bit_integers = 1`, `output_format_json_quote_decimals = 1`, and `date_time_output_format = \"iso\"`. If caller settings conflict with those values, ck-orm logs a warning once and sends the forced value; workload/performance settings such as `max_threads` remain caller-controlled.\n\n### Authentication\n\n`ck-orm` uses basic authentication for database connections.\n\n- in `databaseUrl` mode, credentials may be embedded in the URL\n- in structured mode, use `username` and `password`\n- if no credentials are provided, the default is `default` with an empty password\n\n## Query builder\n\nThe snippets below assume `db`, `probeTelemetry`, and the referenced helpers imported from `ck-orm`.\n\n### `select()`\n\nExplicit selection gives you an explicitly shaped result:\n\n```ts\nconst rows = await db\n  .select({\n    probeId: probeTelemetry.probeId,\n    signalStrength: probeTelemetry.signalStrength,\n  })\n  .from(probeTelemetry)\n  .limit(10);\n```\n\nProjection objects are built from public `Selection` values or columns. In practice that means table columns, `fn.*(...)`, and `ck.expr(...)` outputs all compose the same way inside `select({ ... })`.\n\nImplicit selection returns the full table model when there are no joins:\n\n```ts\nconst rows = await db.select().from(probeTelemetry).limit(10);\n```\n\nWith joins, implicit selection groups fields by source and returns nested objects.\n\n### `from()`, `innerJoin()`, `leftJoin()`\n\n```ts\nimport { ckAlias, ck } from \"ck-orm\";\n\nconst telemetry = ckAlias(probeTelemetry, \"telemetry\");\nconst matchedTelemetry = ckAlias(probeTelemetry, \"matched_telemetry\");\n\nconst rows = await db\n  .select({\n    probeId: telemetry.probeId,\n    telemetrySampleId: telemetry.id,\n    matchedTelemetrySampleId: matchedTelemetry.id,\n  })\n  .from(telemetry)\n  .leftJoin(\n    matchedTelemetry,\n    ck.eq(telemetry.probeId, matchedTelemetry.probeId),\n  );\n```\n\n### `where()` and condition helpers\n\nPublic condition helpers:\n\n- `ck.and`\n- `ck.or`\n- `ck.not`\n- `ck.eq`\n- `ck.ne`\n- `ck.gt`\n- `ck.gte`\n- `ck.lt`\n- `ck.lte`\n- `ck.between`\n- `ck.isNull`\n- `ck.isNotNull`\n- `ck.has`\n- `ck.hasAll`\n- `ck.hasAny`\n- `ck.contains`\n- `ck.startsWith`\n- `ck.endsWith`\n- `ck.containsIgnoreCase`\n- `ck.startsWithIgnoreCase`\n- `ck.endsWithIgnoreCase`\n- `ck.like`\n- `ck.notLike`\n- `ck.ilike`\n- `ck.notIlike`\n- `ck.inArray`\n- `ck.notInArray`\n- `ck.exists`\n- `ck.notExists`\n\n`.where(...predicates)` is a variadic `AND` entrypoint. It ignores `undefined` predicate objects, so you can either pass multiple predicates directly or build grouped predicates with `ck.and(...)` and `ck.or(...)`.\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst query = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    signalStrength: probeTelemetry.signalStrength,\n  })\n  .from(probeTelemetry)\n  .where(\n    ck.eq(probeTelemetry.status, 1),\n    ck.inArray(probeTelemetry.missionId, [10, 20, 30]),\n    ck.between(probeTelemetry.createdAt, 1710000000, 1719999999),\n  );\n```\n\n`ck.and(...)` skips `undefined`, which makes inline dynamic filters easy to assemble:\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst query = db\n  .select({\n    id: probeTelemetry.id,\n    status: probeTelemetry.status,\n  })\n  .from(probeTelemetry)\n  .where(\n    ck.and(\n      minId !== undefined ? ck.gt(probeTelemetry.id, minId) : undefined,\n      status !== undefined\n        ? ck.or(ck.eq(probeTelemetry.status, status), ck.eq(probeTelemetry.status, 9))\n        : undefined,\n    ),\n  );\n```\n\n`undefined` is only skipped at the predicate level. Predicate values are strict: `ck.eq(column, undefined)` throws instead of silently widening the query. Bare `null`, `false`, `true`, `0`, and `\"\"` are not predicates; use a SQL expression instead. `null` remains a valid data value for Nullable columns and writes, but NULL filtering must be explicit:\n\n```ts\ndb.select()\n  .from(probeTelemetry)\n  .where(ck.isNull(probeTelemetry.deletedAt));\n```\n\nBoolean columns are still normal values and SQL expressions:\n\n```ts\nconst healthChecks = ckTable(\"health_checks\", {\n  id: ckType.int32(),\n  isPassing: ckType.bool(\"is_passing\"),\n});\n\ndb.select().from(healthChecks).where(ck.eq(healthChecks.isPassing, false));\ndb.select().from(healthChecks).where(healthChecks.isPassing);\n```\n\nDo not put bare `null` inside normal comparisons or `IN` lists. Compose NULL logic explicitly:\n\n```ts\nck.or(\n  ck.inArray(probeTelemetry.deletedAt, [new Date(\"2026-04-21T00:00:00.000Z\")]),\n  ck.isNull(probeTelemetry.deletedAt),\n);\n```\n\nFor larger runtime-built filters, prefer `Predicate[]` plus variadic `.where(...predicates)`:\n\n```ts\nimport { ck, type Predicate } from \"ck-orm\";\n\nconst predicates: Predicate[] = [];\n\nif (minId !== undefined) {\n  predicates.push(ck.gt(probeTelemetry.id, minId));\n}\n\nif (status !== undefined) {\n  predicates.push(ck.or(ck.eq(probeTelemetry.status, status), ck.eq(probeTelemetry.status, 9)));\n}\n\nconst query = db\n  .select({\n    id: probeTelemetry.id,\n    status: probeTelemetry.status,\n  })\n  .from(probeTelemetry)\n  .where(...predicates);\n```\n\n`Predicate` is the public name for reusable boolean SQL clauses. You can use the same predicate objects in `where`, `having`, join `on` clauses, and boolean-aware helpers such as `ck.exists(...)`.\n\n`Selection` is the public name for reusable computed builder values such as `fn.sum(...)`, `fn.toString(...)`, and `ck.expr(ckSql...)`. Use `.as(...)` to alias them and `.mapWith(...)` to override decoding. `Order` is the clause object returned by `ck.asc(...)` and `ck.desc(...)`.\n\n`ck.has(...)`, `ck.hasAll(...)`, and `ck.hasAny(...)` map directly to the native ClickHouse functions and keep ClickHouse's array, map, and JSON semantics. When the left side is an array column, plain JavaScript values are encoded through that column first, so `Array(Date)` filters use the configured Date encoder before they become query parameters.\n\n`where(...)` is variadic, while `having(...)` takes a single predicate. For multi-clause `having`, compose the predicate first with `ck.and(...)` or `ck.or(...)`.\n\n`ck.contains(...)`, `ck.startsWith(...)`, `ck.endsWith(...)` and their `*IgnoreCase` variants treat the input as literal text. They parameterize the value and escape LIKE wildcard characters (`%`, `_`, `\\`) internally.\n\nUse `ck.like(...)` / `ck.ilike(...)` only when you intentionally want full pattern semantics. Those APIs still parameterize values for SQL safety, but `%` and `_` keep their wildcard meaning because LIKE is a pattern language.\n\nLiteral-text search example:\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst rows = await db\n  .select({\n    probeId: probeTelemetry.probeId,\n  })\n  .from(probeTelemetry)\n  .where(ck.contains(probeTelemetry.probeId, \"probe_alpha%\"));\n```\n\nAdvanced pattern example:\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst rows = await db\n  .select({\n    probeId: probeTelemetry.probeId,\n  })\n  .from(probeTelemetry)\n  .where(ck.like(probeTelemetry.probeId, \"probe_%\"));\n```\n\n### `groupBy()`, `having()`, `orderBy()`, `limit()`, `offset()`\n\n```ts\nimport { ck, fn } from \"ck-orm\";\n\nconst totalSignalStrength = fn.sum(probeTelemetry.signalStrength).as(\n  \"total_signal_strength\",\n);\n\nconst query = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    totalSignalStrength,\n  })\n  .from(probeTelemetry)\n  .groupBy(probeTelemetry.probeId)\n  .having(ck.gt(fn.sum(probeTelemetry.signalStrength), \"100.00000\"))\n  .orderBy(ck.desc(probeTelemetry.createdAt))\n  .limit(20)\n  .offset(0);\n```\n\n`groupBy()` and `limitBy([...])` accept columns and computed `Selection` values from helpers like `fn.*(...)` or `ck.expr(...)`.\n\nPrimitive `limit()`, `offset()`, and `limitBy(..., limit)` values must be non-negative safe integers. Use `ckSql` only when you intentionally need a ClickHouse constant expression.\n\n`orderBy()` accepts:\n\n- `ck.desc(selection)`\n- `ck.asc(selection)`\n- a column directly\n\n### `final()`\n\nAppend table-level `FINAL` to a table query:\n\n```ts\nconst query = db.select().from(probeTelemetry).final();\n```\n\nFor simple unaliased table reads, `ck-orm` emits `FROM table FINAL`. When the root table is aliased or the query joins additional sources, `ck-orm` wraps the finalized table in a subquery and keeps the alias on the outer source. This avoids ClickHouse analyzer edge cases around `FINAL`, table aliases, joins, and lambda expressions while preserving the same builder API.\n\n`final()` only applies to a table root source. If you need `FINAL` inside a CTE, subquery, or table-function flow, place `.final()` on the table-backed query before calling `.as(...)`.\n\n### `limitBy()`\n\nUse ClickHouse `LIMIT ... BY ...`:\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst query = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    createdAt: probeTelemetry.createdAt,\n  })\n  .from(probeTelemetry)\n  .orderBy(ck.desc(probeTelemetry.createdAt))\n  .limitBy([probeTelemetry.probeId], 1);\n```\n\n### Execution modes\n\nBuilder queries can be executed in three ways:\n\n```ts\nconst query = db.select().from(probeTelemetry).limit(10);\n\nconst rows = await query;\nconst sameRows = await query.execute();\n\nfor await (const row of query.iterator()) {\n  console.log(row);\n}\n```\n\nUse `.execute()` in application examples when you want the execution point to be visually obvious. Direct `await query` is supported for Drizzle-style ergonomics and is useful once the team is familiar with builder queries being thenable.\n\n`query.iterator()` uses the same session-aware concurrency rules as `db.stream()`: if the query targets a `session_id`, the slot stays occupied until iteration finishes or the iterator is closed early.\n\n### Subqueries and CTEs\n\nUse `.as(\"alias\")` to turn a builder into an explicitly named subquery:\n\n```ts\nconst latestTelemetrySample = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    createdAt: probeTelemetry.createdAt,\n  })\n  .from(probeTelemetry)\n  .orderBy(ck.desc(probeTelemetry.createdAt))\n  .limit(10)\n  .as(\"latest_telemetry_sample\");\n```\n\n`.as(\"…\")` is **optional** for subqueries — if you don't call it, the\nframework assigns an auto alias (`__sub_1`, `__sub_2`, …) at compile time.\nA bare builder works directly in `from()`, `innerJoin()`, `leftJoin()`,\n`inArray()`, `notInArray()`, `exists()`, and `notExists()`.\n\n```ts\n// Bare builder, variable-bound — column refs are accessible.\nconst signalTotals = db\n  .select({\n    probeId: probeTelemetry.probeId,\n    totalSignalStrength: fn.sum(probeTelemetry.signalStrength).as(\"total\"),\n  })\n  .from(probeTelemetry)\n  .groupBy(probeTelemetry.probeId);\n\nawait db\n  .select({\n    probeId: signalTotals.probeId,\n    totalSignalStrength: signalTotals.totalSignalStrength,\n  })\n  .from(signalTotals);\n\n// Bare builder inline — use the callback form of innerJoin/leftJoin so the\n// `on` condition can reference its columns via the `joined` parameter.\nawait db\n  .select({ probeId: probeTelemetry.probeId })\n  .from(probeTelemetry)\n  .innerJoin(\n    db\n      .select({\n        peerProbeId: probeTelemetry.probeId,\n        peerCount: fn.count().as(\"peer_count\"),\n      })\n      .from(probeTelemetry)\n      .groupBy(probeTelemetry.probeId),\n    (joined) => ck.eq(probeTelemetry.probeId, joined.peerProbeId),\n  );\n\n// inArray accepts a bare builder directly.\nawait db\n  .select({ probeId: probeTelemetry.probeId })\n  .from(probeTelemetry)\n  .where(\n    ck.inArray(\n      probeTelemetry.probeId,\n      db.select({ activeProbeId: probeTelemetry.probeId }).from(probeTelemetry),\n    ),\n  );\n```\n\n#### Style guide — when to use `.as(name)` vs bare\n\n| Situation | Recommended form |\n|---|---|\n| One-off inline subquery, no need to reuse | bare builder + callback `innerJoin/leftJoin`, or bare in `inArray/exists` |\n| Subquery's column refs used in multiple places (SELECT / WHERE / one JOIN) | bind to a `const` and pass it bare — refs flow through chain methods |\n| Self-join (same logical subquery, two SQL aliases) | call `.as(\"a\")` and `.as(\"b\")` explicitly — reusing the same instance as a source twice throws when the query is compiled to SQL |\n| Need a stable, readable, or typed alias (production `query_log` search, `EXPLAIN`, slow logs, cross-module helpers, literal `TAlias` source key) | call `.as(\"descriptive_name\")` |\n\nThe auto alias is **not** stable across compiles of structurally different\nqueries, but is stable within one compile and between repeated compiles of\nthe same builder tree — `snapshot` style tests don't need normalization.\n\n#### Selection key conflicts\n\nSelection keys that collide with SelectBuilder method names (`from`,\n`where`, `select`, `as`, `innerJoin`, `leftJoin`, `groupBy`, `having`,\n`orderBy`, `limit`, `offset`, `final`, `limitBy`, `execute`, `iterator`,\n`then`, `catch`, `finally`, `buildSelectionItems`) keep their method type\non the bare builder. `sub.from` always returns the builder method, never a\ncolumn ref — even if `from` is in the selection. Rename such keys (e.g.\n`from` → `fromAddress`) or wrap the subquery with `.as(\"name\")` so column\naccess goes through the dedicated `Subquery` object.\n\nUse `$with()` and `with()` for CTEs:\n\n```ts\nimport { ck, fn } from \"ck-orm\";\n\nconst rankedProbes = db.$with(\"ranked_probes\").as(\n  db\n    .select({\n      probeId: probeTelemetry.probeId,\n      totalSignalStrength: fn.sum(probeTelemetry.signalStrength).as(\n        \"total_signal_strength\",\n      ),\n    })\n    .from(probeTelemetry)\n    .groupBy(probeTelemetry.probeId),\n);\n\nconst rows = await db\n  .with(rankedProbes)\n  .select({\n    probeId: rankedProbes.probeId,\n    totalSignalStrength: rankedProbes.totalSignalStrength,\n  })\n  .from(rankedProbes);\n```\n\n### `db.count()`\n\nUse `db.count(source, ...predicates)` for a Drizzle-style count helper. It follows the same predicate semantics as `.where(...predicates)`: multiple predicates are combined with `AND`, and `undefined` predicate objects are skipped. Value-level `undefined` inside helpers such as `ck.eq(...)` still throws.\n\n```ts\nimport { ck } from \"ck-orm\";\n\nconst total = await db.count(\n  probeTelemetry,\n  ck.eq(probeTelemetry.status, 1),\n  ck.gt(probeTelemetry.id, 1000),\n);\n```\n\nFor more complex result sets, count a subquery or CTE:\n\n```ts\nconst activeProbes = db\n  .select({\n    probeId: probeTelemetry.probeId,\n  })\n  .from(probeTelemetry)\n  .where(ck.eq(probeTelemetry.status, 1))\n  .as(\"active_probes\");\n\nconst total = await db.count(activeProbes);\n```\n\n`db.count(...)` defaults to the numeric count mode: it renders `toFloat64(count())` and decodes to `number`. Very large counts can exceed JavaScript integer precision, so use the chainable modes when exactness or wire-shape fidelity matters:\n\n```ts\nconst approximateTotal = await db.count(activeProbes); // number\nconst exactTotal = await db.count(activeProbes).toSafe(); // string\nconst wireTotal = await db.count(activeProbes).toMixed(); // number | string\n```\n\n`.toSafe()` renders `toString(count())` and is intended for exact reads. If you use a safe count as a SQL expression, it has `String` semantics; use the default/`.toUnsafe()` or `.toMixed()` for numeric SQL comparisons. `.toMixed()` renders `toUInt64(count())` and preserves the driver/wire shape; with ck-orm's default lossless 64-bit JSON settings, real ClickHouse responses usually arrive as `string`.\n\n## Join null semantics\n\n`leftJoin()` defaults to SQL-style null semantics by automatically applying `join_use_nulls = 1`.\n\nThat means:\n\n- the right side of a default left join is inferred as nullable\n- if you explicitly disable `join_use_nulls`, the inferred types change as well\n\nTo align with ClickHouse default join behavior:\n\n```ts\nconst rawDefaultDb = db.withSettings({\n  join_use_nulls: 0,\n});\n```\n\nThe forced `join_use_nulls = 1` setting is preserved when a joined query is reused as a subquery, CTE, `ck.exists(...)`, or `ck.inArray(...)` source, so builder types stay aligned with runtime behavior.\n\n## Writes\n\n### `insert(table).values(...)`\n\nUse the builder when you want typed inserts that follow the table schema:\n\n```ts\nawait db.insert(probeTelemetry).values({\n  id: 1,\n  probeId: \"probe_alpha\",\n  missionId: 10,\n  sampleId: \"900001\",\n  signalStrength: \"42.50000\",\n  status: 1,\n  createdAt: 1710000000,\n  deletedAt: null,\n  ingestedAt: new Date(\"2026-04-21T00:00:00.000Z\"),\n  isDeleted: 0,\n  ingestVersion: \"1\",\n});\n```\n\nInsert rows must use keys from the table schema. Unknown keys are rejected early. Omitted columns continue to use `DEFAULT`.\n\n### `insert(table).fromSelect(select)`\n\nUse `.fromSelect(...)` to compile a single `INSERT INTO target (cols) SELECT ...` statement and let ClickHouse materialise the SELECT server-side. No rows travel through the Node process — ideal for scoping a large source table once and reusing the materialised slice across multiple downstream queries inside `runInSession`.\n\n```ts\nawait db.runInSession(async (session) => {\n  const tmpScopedDeals = ckTable(\"tmp_scoped_deals\", {\n    dealTicket: ckType.int64(\"deal_ticket\"),\n    login: ckType.int64(),\n    volume: ckType.float64(),\n  });\n\n  await session.createTemporaryTable(tmpScopedDeals);\n\n  await session.insert(tmpScopedDeals).fromSelect(\n    session\n      .select({\n        dealTicket: mtDeal.dealTicket,\n        login: mtDeal.login,\n        volume: mtDeal.volume,\n      })\n      .from(mtDeal)\n      .where(ck.inArray(mtDeal.entry, [1, 2, 3])),\n  );\n\n  // Subsequent count / aggregation queries scan the temp table, not mt_deal:\n  const totalRows = await session.count(tmpScopedDeals);\n  const byLogin = await session\n    .select({ login: tmpScopedDeals.login, volume: fn.sum(tmpScopedDeals.volume) })\n    .from(tmpScopedDeals)\n    .groupBy(tmpScopedDeals.login);\n});\n```\n\nRules:\n\n- The SELECT must project every required column of the target table; columns declared with `.default(...)` may be omitted. Missing required columns are rejected at compile time (TypeScript) and again at runtime.\n- The INSERT column list is generated in the SELECT projection key order, so callers see `name-aligned` semantics even though ClickHouse aligns columns by position. Projection key order is irrelevant to which target column receives which value — the keys themselves are matched.\n- Unknown projection keys (not on the target table) and per-column type mismatches surface as TypeScript errors before the query is sent.\n- `.values()` and `.fromSelect()` are mutually exclusive on a single insert chain — the builder type narrows so the unused method disappears from autocomplete, and the runtime rejects the call too.\n- The compiled wire request is a plain ClickHouse command — `mode: \"insert\"` in the query event, `tableName` set to the target table.\n- `.fromSelect()` accepts a `SelectBuilder` (`session.select({...}).from(...)`), not a subquery wrapper. Use `.as(\"name\")` only when you need the result as a CTE/subquery inside another SELECT, not when handing it to `.fromSelect()`.\n\n#### Nested columns\n\n`ckType.nested(...)` columns interact with `.fromSelect()` in three modes:\n\n1. **Omit the nested key from the projection.** This is the default mode and reflects ck-orm's runtime contract: a missing nested value is encoded as SQL `DEFAULT`, and ClickHouse fills empty parallel arrays for every field. The TS layer treats nested columns as `optional` in `$inferInsert` to mirror this.\n2. **Project a direct nested column reference**, e.g. `select({ events: src.events })`. ck-orm wraps the inner SELECT in a subquery and rewrites the outer projection into per-field dot-path access (`__ck_inner.events.name`, `__ck_inner.events.score`, …). The source nested shape must contain every field the target nested expects.\n3. **Project a computed expression into a nested column** is rejected at compile time — a single SQL expression cannot fan out into the parallel array fields. Use `.values(...)` or `.insertJsonEachRow(...)` for row-wise computed inserts.\n\nIf you want the TS layer to enforce that nested data is always supplied (`Pattern D` — business contract that disallows empty nested arrays), opt in with `ckType.nested({...}).requiredOnInsert()`. The chain returns a column whose `$inferInsert` shape lists `events` as required, and `.fromSelect()` requires either the projection-of-nested-column-ref mode or the row-wise alternative.\n\n> **JSON wire-format note**: `.values()` parameterises JSON column inputs via `JSON.stringify(...)` cast to `String` (ClickHouse implicitly casts back to JSON on the server). `.fromSelect()` runs entirely server-side, so JSON values never round-trip through the JS process. Both paths produce identical stored data.\n\n### `insertJsonEachRow()`\n\nUse `insertJsonEachRow()` when you already have object rows or an async row stream:\n\n```ts\nawait db.insertJsonEachRow(\"tmp_scope\", [\n  { probe_id: \"probe_alpha\" },\n  { probe_id: \"probe_beta\" },\n]);\n```\n\nIt accepts:\n\n- a string table name\n- a table object created by `ckTable()`\n- a regular array\n- an `AsyncIterable`\n\nAn empty regular array is treated as a client-side no-op and still reports a successful insert lifecycle with `rowCount: 0` to instrumentation hooks. ClickHouse controls unknown-field behavior; pass settings such as `input_format_skip_unknown_fields: 1` when you want the server to ignore extra JSON fields.\n\n## Raw SQL\n\n`ck-orm` includes its own SQL template API. Use it when builder syntax would be less direct than the SQL you already want to write.\n\n### `` ckSql`...` ``\n\n```ts\nimport { ckSql, fn } from \"ck-orm\";\n\nconst rows = await db.execute(ckSql`\n  select\n    ${probeTelemetry.probeId},\n    ${fn.sum(probeTelemetry.signalStrength)} as total_signal_strength\n  from ${probeTelemetry}\n  where ${probeTelemetry.id} > ${10}\n  group by ${probeTelemetry.probeId}\n`);\n```\n\n### `ckSql.join()` and `ckSql.identifier()`\n\n```ts\nimport { ckSql } from \"ck-orm\";\n\nconst fields = ckSql.join(\n  [ckSql.identifier(\"probe_id\"), ckSql.identifier(\"signal_strength\")],\n  \", \",\n);\n\nconst rows = await db.execute(\n  ckSql`select ${fields} from ${ckSql.identifier(\"probe_telemetry\")}`,\n);\n```\n\n### Raw SQL with `query_params`\n\n```ts\nimport { ckSql } from \"ck-orm\";\n\nconst rows = await db.execute(\n  ckSql`select probe_id, signal_strength from probe_telemetry where probe_id = {probe_id:String} limit {limit:Int64}`,\n  {\n    query_params: {\n      probe_id: \"probe_alpha\",\n      limit: 10,\n    },\n  },\n);\n```\n\nParameter transport is chosen automatically. You do not need to configure multipart handling for `query_params`.\n\n`query_params` keys that start with `orm_param` are rejected. That prefix is reserved for parameters generated internally by `` ckSql`...` ``.\n\nThe value formatter supports primitive values, `Date`, `NaN`, `Infinity`, arrays, tuple-shaped arrays, objects, and `Map` values for ClickHouse typed placeholders such as `{ids:Array(UInt64)}`, `{pair:Tuple(String, Int32)}`, or `{attrs:Map(String, String)}`. Use ClickHouse's `Identifier` placeholder type when the parameter is a table or column name:\n\n```ts\nconst rows = await db.execute(\n  ckSql`\n    select {selected_column:Identifier}\n    from {target_table:Identifier}\n    where id = {id:Int32}\n  `,\n  {\n    query_params: {\n      selected_column: \"probe_id\",\n      target_table: \"probe_telemetry\",\n      id: 1,\n    },\n  },\n);\n```\n\n### `ck.expr()`\n\nUse `ck.expr()` to wrap a SQL fragment as a reusable `Selection`:\n\n```ts\nimport { ck, ckSql } from \"ck-orm\";\n\nconst query = db.select({\n  constantOne: ck.expr(ckSql`1`).as(\"constant_one\"),\n});\n```\n\nWhen the fragment is typed, `ck.expr()` keeps that type. An untyped fragment\nintentionally remains `unknown`; pass a generic or decoder when its result is\nknown outside the schema:\n\n```ts\nconst status = ck.expr(ckSql<string>`'closed'`); // Selection<string>\nconst enabled = ck.expr<boolean>(ckSql`1`, {\n  decoder: (value) => Number(value) === 1,\n});\n```\n\n### Raw query formats\n\nRaw eager queries only support `JSON` output:\n\n```ts\nconst rows = await db.execute(ckSql`select 1`, {\n  format: \"JSON\",\n});\n```\n\nRaw streaming queries only support `JSONEachRow` output:\n\n```ts\nfor await (const row of db.stream(ckSql`select 1`, {\n  format: \"JSONEachRow\",\n})) {\n  console.log(row);\n}\n```\n\n### Decimal precision in expressions\n\n```ts\nimport { ckSql, ckTable, ckType, fn } from \"ck-orm\";\n\nconst measurementLog = ckTable(\"measurement_log\", {\n  value: ckType.decimal({ precision: 18, scale: 5 }),\n});\n\n// fn.sum / sumIf / min / max auto-cast to Decimal(P, S) and decode as string.\ndb.select({ total: fn.sum(measurementLog.value) }).from(measurementLog);\n// → CAST(sum(`measurement_log`.`value`) AS Decimal(38, 5))   row.total: string\n\n// Explicit casts.\nfn.toDecimal128(measurementLog.value, 5); // toDecimal32 / 64 / 128 / 256\nckSql.decimal(ckSql`sum(a) - sum(b)`, 20, 5);\nmeasurementLog.value.cast(20, 2); // column shortcut\n```\n\n- `sum` / `sumIf` widen P to ≥ 38; `min` / `max` keep the column's P. For schema Decimal columns, `fn.sum()` and `fn.sumIf()` are `Selection<string>`; Float columns are `Selection<number>`. Auto-cast also fires through `nullable(decimal(...))` and `lowCardinality(decimal(...))`.\n- `maxIf(value, condition)` follows the same Decimal rule as `max`: a Decimal result is `Selection<string>` with its declared `Decimal(P, S)` shape.\n- `avg` is **not** auto-cast — ClickHouse computes `avg(Decimal)` over Float64, so `fn.avg` returns `Selection<number>`. For exact Decimal averages, use `ckSql.decimal(ckSql\\`sum(x) / count(x)\\`, P, S)`.\n- `fn.divideDecimal(left, right, resultScale?)` maps directly to ClickHouse `divideDecimal`. It returns `Selection<string>` so precision is not lost. When provided, `resultScale` must be a literal integer from `0` to `76` and is emitted inline; the builder does not version-check or emulate the ClickHouse function.\n- `column.cast(P, S)` casts the column, not the aggregate — using it bare inside `GROUP BY` raises `NOT_AN_AGGREGATE`. Use `fn.sum(column)` or wrap the aggregate.\n- Inserts reject non-string/number objects (e.g. raw `decimal.js` instances) — pass `.toFixed(scale)`:\n\n```ts\ndb.insert(measurementLog).values({ value: new Decimal(\"1.23\").toFixed(5) }); // ✅\ndb.insert(measurementLog).values({ value: new Decimal(\"1.23\") as never }); // ❌ throws\n```\n\n## Window expressions\n\nWrap an `fn.*` function expression with `fn.over(...)`. The optional specification accepts only builder selections for `partitionBy` and normal `ck.asc(...)` / `ck.desc(...)` values for `orderBy`:\n\n```ts\nimport { ck, ckTable, ckType, fn } from \"ck-orm\";\n\nconst events = ckTable(\"events\", {\n  id: ckType.int32(),\n  accountId: ckType.int32(\"account_id\"),\n  amount: ckType.decimal({ precision: 18, scale: 2 }),\n});\n\nconst rows = await db\n  .select({\n    id: events.id,\n    rankInAccount: fn\n      .over(fn.rowNumber(), {\n        partitionBy: [events.accountId],\n        orderBy: [ck.asc(events.id)],\n      })\n      .as(\"rank_in_account\"),\n    exactRankInAccount: fn\n      .over(fn.rowNumber().toSafe(), {\n        partitionBy: [events.accountId],\n        orderBy: [ck.asc(events.id)],\n      })\n      .as(\"exact_rank_in_account\"),\n    accountTotal: fn\n      .over(fn.sum(events.amount), { partitionBy: [events.accountId] })\n      .as(\"account_total\"),\n  })\n  .from(events);\n```\n\n`fn.rowNumber()` defaults to unsafe `Selection<number>` through `toFloat64`. Call `.toSafe()` before `fn.over(...)` for an exact `Selection<string>`, or `.toMixed()` for the native `UInt64` transport shape (`Selection<number | string>`); `.toUnsafe()` is the explicit default. The builder deliberately does not add a JavaScript safe-integer check: ClickHouse's `toFloat64` conversion can round values above `Number.MAX_SAFE_INTEGER`; `.toSafe()` keeps an exact decimal string and `.toMixed()` preserves the driver's native result shape. Decimal aggregates retain their normal string decoder and are compiled as `CAST(sum(...) OVER (...) AS Decimal(...))`, so `OVER` stays inside the aggregate rather than outside the cast. `fn.over` intentionally does not accept a bare column or raw SQL fragment, and this first surface covers `PARTITION BY` and `ORDER BY` only; use `ckSql` for frames, named windows, or other ClickHouse-specific clauses.\n\n## Functions and table functions\n\n### `fn`\n\nGeneric, conversion, aggregate, JSON, tuple, and table-related helpers include:\n\n- `fn.call()`\n- `fn.withParams()`\n- `fn.replaceRegexpAll()` — typed ClickHouse RE2 replacement; see [Regex replacement](#regex-replacement)\n- Type conversion helpers mirror the ClickHouse Type conversion page: `fn.cast()`, `fn.date()`, `fn.accurateCast*()`, `fn.reinterpret*()`, `fn.parseDateTime*()`, `fn.formatDateTime()`, `fn.formatRow*()`, `fn.toString*()`, `fn.toBool()`, `fn.toInt*()`, `fn.toUInt*()`, `fn.toFloat*()`, `fn.toBFloat16*()`, `fn.toDecimal*()`, `fn.toDecimalString()`, `fn.toFixedString()`, `fn.toDate*()`, `fn.toDateTime*()`, `fn.toTime*()`, `fn.toTime64*()`, `fn.toInterval*()`, `fn.toLowCardinality()`, `fn.toNullable()`, and `fn.toUUID*()`.\n- 64-bit-and-wider integer conversions (`toInt64/128/256*`, `toUInt64/128/256*`, Unix timestamp 64 helpers) decode as `string`; narrower integer and floating conversions decode as `number`.\n- Literal-only ClickHouse arguments are validated and inlined where required: Decimal scale, DateTime64/Time64 precision, FixedString length, target type strings, and interval units.\n- `fn.toStartOfMonth()`\n- `fn.toUnixTimestamp()` / `fn.toUnixTimestamp64Second()` / `fn.toUnixTimestamp64Milli()` / `fn","readmeFilename":"README.md"}