diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a0a17600..3afe0e966 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -208,10 +208,17 @@ jobs: - name: Run build with newer TypeScript run: npm run build - - name: Install older TypeScript - run: npm i -D typescript@${{ matrix.typescript-version }} tsd@${{ fromJson('{ "^4.6":"0.20.0", "^4.7":"0.22.0", "^4.8":"0.24.1", "^4.9":"0.27.0", "^5.0":"0.28.1", "^5.2":"0.29.0", "^5.3":"0.30.7", "^5.4":"0.31.2" }')[matrix.typescript-version] }} + - run: | + echo "TS_VERSION=${{ matrix.typescript-version }}" >> $GITHUB_ENV + echo "TSD_VERSION=${{ fromJson('{ "^4.6":"0.20.0", "^4.7":"0.22.0", "^4.8":"0.24.1", "^4.9":"0.27.0", "^5.0":"0.28.1", "^5.2":"0.29.0", "^5.3":"0.30.7", "^5.4":"0.31.2" }')[env.TS_VERSION] }} >> $GITHUB_ENV" - - name: Run tests with older TypeScript + - name: Install Typescript (${{ env.TS_VERSION }}) and TSD (${{ env.TSD_VERSION }}) + run: npm i -D typescript@${{ env.TS_VERSION }} tsd@${{ env.TSD_VERSION }} + + - name: Exclude non-backward compatible tests + run: npx tsx ./scripts/exclude-test-files-for-backwards-compat.mts + + - name: Run tests with older TypeScript version run: npm run test:typings && npm run test:node:build jsdocs: diff --git a/.npmignore b/.npmignore index c92c384f7..d9e1ad890 100644 --- a/.npmignore +++ b/.npmignore @@ -16,4 +16,4 @@ package-lock.json tsconfig-base.json tsconfig-cjs.json tsconfig.json - +CONTRIBUTING.md diff --git a/outdated-typescript.d.ts b/outdated-typescript.d.ts new file mode 100644 index 000000000..ec280583e --- /dev/null +++ b/outdated-typescript.d.ts @@ -0,0 +1,5 @@ +import type { KyselyTypeError } from './dist/cjs/util/type-error' + +declare const Kysely: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> +declare const RawBuilder: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> +declare const sql: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'> diff --git a/package-lock.json b/package-lock.json index dc3a67a66..2e0f9838f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@types/node": "^22.5.0", "@types/pg": "^8.11.6", "@types/pg-cursor": "^2.7.2", + "@types/semver": "^7.5.8", "@types/sinon": "^17.0.2", "@types/tedious": "^4.0.9", "better-sqlite3": "^11.2.1", @@ -28,19 +29,22 @@ "lodash": "^4.17.21", "mocha": "^10.7.3", "mysql2": "^3.11.0", + "pathe": "^1.1.2", "pg": "^8.12.0", "pg-cursor": "^2.11.0", "pkg-pr-new": "^0.0.30", "playwright": "^1.46.1", "prettier": "^3.3.3", + "semver": "^7.6.3", "sinon": "^19.0.2", "tarn": "^3.0.2", "tedious": "^19.0.0", "tsd": "^0.31.1", + "tsx": "^4.19.1", "typescript": "^5.6.3" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@andrewbranch/untar.js": { @@ -1531,6 +1535,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/sinon": { "version": "17.0.3", "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", @@ -2535,6 +2545,7 @@ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -2579,6 +2590,18 @@ "node": "*" } }, + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", @@ -4054,6 +4077,7 @@ "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -4320,9 +4344,9 @@ } }, "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "dev": true }, "node_modules/read-pkg": { @@ -4519,6 +4543,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -4579,13 +4612,10 @@ "dev": true }, "node_modules/semver": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", - "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -4593,18 +4623,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/seq-queue": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", @@ -5146,9 +5164,9 @@ } }, "node_modules/tsd": { - "version": "0.31.1", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.1.tgz", - "integrity": "sha512-sSL84A0SFwx2xGMWrxlGaarKFSQszWjJS2vgNDDLwatytzg2aq6ShlwHsBYxRNmjzXISODwMva5ZOdAg/4AoOA==", + "version": "0.31.2", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.2.tgz", + "integrity": "sha512-VplBAQwvYrHzVihtzXiUVXu5bGcr7uH1juQZ1lmKgkuGNGT+FechUCqmx9/zk7wibcqR2xaNEwCkDyKh+VVZnQ==", "dev": true, "dependencies": { "@tsd/typescript": "~5.4.3", @@ -5172,6 +5190,473 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, + "node_modules/tsx": { + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.19.1.tgz", + "integrity": "sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==", + "dev": true, + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index 493d394d1..60fd04100 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,17 @@ "url": "git://github.com/kysely-org/kysely.git" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "main": "dist/cjs/index.js", "module": "dist/esm/index.js", + "typesVersions": { + "<4.6": { + "*": [ + "outdated-typescript.d.ts" + ] + } + }, "exports": { ".": { "import": "./dist/esm/index.js", @@ -54,6 +61,7 @@ "test:esbuild": "esbuild --bundle --platform=node --external:pg-native dist/esm/index.js --outfile=/dev/null", "test:exports": "attw --pack . && node scripts/check-exports.js", "test:jsdocs": "deno check --doc-only --no-lock --unstable-sloppy-imports --config=\"deno.check.json\" ./src", + "test:outdatedts": "npm run build && cd test/outdated-ts && npm ci && npm test", "prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", "build": "npm run clean && (npm run build:esm & npm run build:cjs) && npm run script:module-fixup && npm run script:copy-interface-doc", "build:esm": "tsc -p tsconfig.json && npm run script:add-deno-type-references", @@ -82,6 +90,7 @@ "@types/node": "^22.5.0", "@types/pg": "^8.11.6", "@types/pg-cursor": "^2.7.2", + "@types/semver": "^7.5.8", "@types/sinon": "^17.0.2", "@types/tedious": "^4.0.9", "better-sqlite3": "^11.2.1", @@ -92,15 +101,18 @@ "lodash": "^4.17.21", "mocha": "^10.7.3", "mysql2": "^3.11.0", + "pathe": "^1.1.2", "pg": "^8.12.0", "pg-cursor": "^2.11.0", "pkg-pr-new": "^0.0.30", "playwright": "^1.46.1", "prettier": "^3.3.3", + "semver": "^7.6.3", "sinon": "^19.0.2", "tarn": "^3.0.2", "tedious": "^19.0.0", "tsd": "^0.31.1", + "tsx": "^4.19.1", "typescript": "^5.6.3" } } diff --git a/scripts/copy-interface-documentation.js b/scripts/copy-interface-documentation.js index 56a8a0df4..735886870 100644 --- a/scripts/copy-interface-documentation.js +++ b/scripts/copy-interface-documentation.js @@ -22,7 +22,7 @@ const OBJECT_REGEXES = [ /^(?:export )?declare (?:abstract )?class (\w+)/, /^(?:export )?interface (\w+)/, ] -const GENERIC_ARGUMENTS_REGEX = /<[\w"'`,{}=| ]+>/g +const GENERIC_ARGUMENTS_REGEX = /<[\w"'`,{}=|\[\] ]+>/g const JSDOC_START_REGEX = /^\s+\/\*\*/ const JSDOC_END_REGEX = /^\s+\*\// @@ -123,7 +123,7 @@ function parseObjects(file) { function parseImplements(line) { if (!line.endsWith('{')) { console.warn( - `skipping object declaration "${line}". Expected it to end with "{"'` + `skipping object declaration "${line}". Expected it to end with "{"'`, ) return [] } @@ -225,7 +225,7 @@ function findDocProperty(files, object, propertyName) { } const interfaceProperty = interfaceObject.properties.find( - (it) => it.name === propertyName + (it) => it.name === propertyName, ) if (interfaceProperty?.doc) { diff --git a/scripts/exclude-test-files-for-backwards-compat.mts b/scripts/exclude-test-files-for-backwards-compat.mts new file mode 100644 index 000000000..9378dc76d --- /dev/null +++ b/scripts/exclude-test-files-for-backwards-compat.mts @@ -0,0 +1,22 @@ +import { writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'pathe' +import { lt } from 'semver' +import { devDependencies } from '../package.json' + +const typescriptVersion = devDependencies.typescript.replace('^', '') +const testTsConfigRelativePath = '../test/node/tsconfig.json' + +if (lt(typescriptVersion, '5.0.0')) { + const tsconfig = await import('../test/node/tsconfig.json') + + await writeFile( + resolve( + dirname(new URL(import.meta.url).pathname), + testTsConfigRelativePath, + ), + JSON.stringify({ + ...tsconfig, + exclude: [...(tsconfig.exclude || []), 'src/async-dispose.test.ts'], + }), + ) +} diff --git a/site/docs/examples/update/0010-single-row.js b/site/docs/examples/update/0010-single-row.js index e82a23a65..b30a98077 100644 --- a/site/docs/examples/update/0010-single-row.js +++ b/site/docs/examples/update/0010-single-row.js @@ -5,6 +5,4 @@ export const singleRow = `const result = await db last_name: 'Aniston' }) .where('id', '=', '1') - .executeTakeFirst() - -console.log(result.numUpdatedRows)` \ No newline at end of file + .executeTakeFirst()` \ No newline at end of file diff --git a/site/docs/examples/update/0020-complex-values.js b/site/docs/examples/update/0020-complex-values.js index 3b88fee1e..caad0ebb6 100644 --- a/site/docs/examples/update/0020-complex-values.js +++ b/site/docs/examples/update/0020-complex-values.js @@ -6,6 +6,4 @@ export const complexValues = `const result = await db last_name: 'updated', })) .where('id', '=', '1') - .executeTakeFirst() - -console.log(result.numUpdatedRows)` \ No newline at end of file + .executeTakeFirst()` \ No newline at end of file diff --git a/site/docs/examples/update/0030-my-sql-joins.js b/site/docs/examples/update/0030-my-sql-joins.js new file mode 100644 index 000000000..400b23c44 --- /dev/null +++ b/site/docs/examples/update/0030-my-sql-joins.js @@ -0,0 +1,7 @@ +export const mySqlJoins = `const result = await db + .updateTable(['person', 'pet']) + .set('person.first_name', 'Updated person') + .set('pet.name', 'Updated doggo') + .whereRef('person.id', '=', 'pet.owner_id') + .where('person.id', '=', '1') + .executeTakeFirst()` \ No newline at end of file diff --git a/site/docs/examples/update/0030-my-sql-joins.mdx b/site/docs/examples/update/0030-my-sql-joins.mdx new file mode 100644 index 000000000..82c4db139 --- /dev/null +++ b/site/docs/examples/update/0030-my-sql-joins.mdx @@ -0,0 +1,40 @@ +--- +title: 'MySQL joins' +--- + +# MySQL joins + +MySQL allows you to join tables directly to the "main" table and update +rows of all joined tables. This is possible by passing all tables to the +`updateTable` method as a list and adding the `ON` conditions as `WHERE` +statements. You can then use the `set(column, value)` variant to update +columns using table qualified names. + +The `UpdateQueryBuilder` also has `innerJoin` etc. join methods, but those +can only be used as part of a PostgreSQL `update set from join` query. +Due to type complexity issues, we unfortunately can't make the same +methods work in both cases. + +import { + Playground, + exampleSetup, +} from '../../../src/components/Playground' + +import { + mySqlJoins +} from './0030-my-sql-joins' + +
+ +
+ +:::info[More examples] +The API documentation is packed with examples. The API docs are hosted [here](https://kysely-org.github.io/kysely-apidoc/), +but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always +just one hover away! + +For example, check out these sections: + - [set method](https://kysely-org.github.io/kysely-apidoc/classes/UpdateQueryBuilder.html#set) + - [returning method](https://kysely-org.github.io/kysely-apidoc/classes/UpdateQueryBuilder.html#returning) + - [updateTable method](https://kysely-org.github.io/kysely-apidoc/classes/Kysely.html#updateTable) +::: diff --git a/site/docs/getting-started/Summary.tsx b/site/docs/getting-started/Summary.tsx index 6fed7f893..555c0869a 100644 --- a/site/docs/getting-started/Summary.tsx +++ b/site/docs/getting-started/Summary.tsx @@ -2,11 +2,7 @@ import Admonition from '@theme/Admonition' import CodeBlock from '@theme/CodeBlock' import Link from '@docusaurus/Link' import { IUseADifferentDatabase } from './IUseADifferentDatabase' -import { - PRETTY_DIALECT_NAMES, - type Dialect, - type PropsWithDialect, -} from './shared' +import { type Dialect, type PropsWithDialect } from './shared' const dialectSpecificCodeSnippets: Record = { postgresql: ` await db.schema.createTable('person') @@ -17,6 +13,7 @@ const dialectSpecificCodeSnippets: Record = { .addColumn('created_at', 'timestamp', (cb) => cb.notNull().defaultTo(sql\`now()\`) ) + .addColumn('metadata', 'jsonb', (cb) => cb.notNull()) .execute()`, mysql: ` await db.schema.createTable('person') .addColumn('id', 'integer', (cb) => cb.primaryKey().autoIncrement()) @@ -26,6 +23,7 @@ const dialectSpecificCodeSnippets: Record = { .addColumn('created_at', 'timestamp', (cb) => cb.notNull().defaultTo(sql\`now()\`) ) + .addColumn('metadata', 'json', (cb) => cb.notNull()) .execute()`, // TODO: Update line 42's IDENTITY once identity(1,1) is added to core. mssql: ` await db.schema.createTable('person') @@ -36,6 +34,7 @@ const dialectSpecificCodeSnippets: Record = { .addColumn('created_at', 'datetime', (cb) => cb.notNull().defaultTo(sql\`GETDATE()\`) ) + .addColumn('metadata', sql\`nvarchar(max)\`, (cb) => cb.notNull()) .execute()`, sqlite: ` await db.schema.createTable('person') .addColumn('id', 'integer', (cb) => cb.primaryKey().autoIncrement().notNull()) @@ -45,6 +44,7 @@ const dialectSpecificCodeSnippets: Record = { .addColumn('created_at', 'timestamp', (cb) => cb.notNull().defaultTo(sql\`current_timestamp\`) ) + .addColumn('metadata', 'text', (cb) => cb.notNull()) .execute()`, } @@ -107,6 +107,12 @@ ${dialectSpecificCodeSnippet} first_name: 'Jennifer', last_name: 'Aniston', gender: 'woman', + metadata: sql.valJson({ + login_at: new Date().toISOString(), + ip: null, + agent: null, + plan: 'free', + }), }) }) diff --git a/site/docs/getting-started/_types.mdx b/site/docs/getting-started/_types.mdx index 42cf066be..1f4b98b58 100644 --- a/site/docs/getting-started/_types.mdx +++ b/site/docs/getting-started/_types.mdx @@ -10,7 +10,7 @@ import { ColumnType, Generated, Insertable, - JSONColumnType, + Json, Selectable, Updateable, } from 'kysely' @@ -45,12 +45,10 @@ export interface PersonTable { // can never be updated: created_at: ColumnType - // You can specify JSON columns using the `JSONColumnType` wrapper. - // It is a shorthand for `ColumnType`, where T - // is the type of the JSON object/array retrieved from the database, - // and the insert and update types are always `string` since you're - // always stringifying insert/update values. - metadata: JSONColumnType<{ + // You can specify JSON columns using the `Json` wrapper. + // When inserting/updating values of such columns, you're required to wrap the + // values with `eb.valJson` or `sql.valJson`. + metadata: Json<{ login_at: string ip: string | null agent: string | null diff --git a/site/docs/recipes/0001-reusable-helpers.md b/site/docs/recipes/0001-reusable-helpers.md new file mode 100644 index 000000000..2cce66949 --- /dev/null +++ b/site/docs/recipes/0001-reusable-helpers.md @@ -0,0 +1,238 @@ +# Reusable helpers + +:::info +[Here's](https://kyse.link/qm67s) a playground link containing all the code in this recipe. +::: + +Let's say you want to write the following query: + +```sql +SELECT id, first_name +FROM person +WHERE upper(last_name) = $1 +``` + +Kysely doesn't have a built-in `upper` function but there are at least three ways you could write this: + +```ts +const lastName = 'STALLONE' + +const persons = await db + .selectFrom('person') + .select(['id', 'first_name']) + // 1. `sql` template tag. This is the least type-safe option. + // You're providing the column name without any type-checking, + // and plugins won't affect it. + .where( + sql`upper(last_name)`, '=', lastName + ) + // 2. `sql` template tag with `ref`. Anything passed to `ref` + // gets type-checked against the accumulated query context. + .where(({ eb, ref }) => eb( + sql`upper(${ref('last_name')})`, '=', lastName + )) + // 3. The `fn` function helps you avoid missing parentheses/commas + // errors and uses refs as 1st class arguments. + .where(({ eb, fn }) => eb( + fn('upper', ['last_name']), '=', lastName + )) + .execute() +``` + +but each option could be more readable or type-safe. + +Fortunately Kysely allows you to easily create composable, reusable and type-safe helper functions: + +```ts +import { Expression, sql } from 'kysely' + +function upper(expr: Expression) { + return sql`upper(${expr})` +} + +function lower(expr: Expression) { + return sql`lower(${expr})` +} + +function concat(...exprs: Expression[]) { + return sql.join(exprs, sql`||`) +} +``` + +Using the `upper` helper, our query would look like this: + +```ts +const lastName = 'STALLONE' + +const persons = await db + .selectFrom('person') + .select(['id', 'first_name']) + .where(({ eb, ref }) => eb( + upper(ref('last_name')), '=', lastName + )) + .execute() +``` + +The recipe for helper functions is simple: take inputs as `Expression` instances where `T` is the type of the expression. For example `upper` takes in any `string` expression since it transforms strings to upper case. If you implemented the `round` function, it'd take in `Expression` since you can only round numbers. + +The helper functions should then use the inputs to create an output that's also an `Expression`. Everything you can create using the expression builder is an instance of `Expression`. So is the output of the `sql` template tag and all methods under the `sql` object. Same goes for `SelectQueryBuilder` and pretty much everything else in Kysely. Everything's an expression. + +See [this recipe](https://kysely.dev/docs/recipes/expressions) to learn more about expressions. + +So we've learned that everything's an expression and that expressions are composable. Let's put this idea to use: + +```ts +const persons = await db + .selectFrom('person') + .select(['id', 'first_name']) + .where(({ eb, ref, val }) => eb( + concat( + lower(ref('first_name')), + val(' '), + upper(ref('last_name')) + ), + '=', + 'sylvester STALLONE' + )) + .execute() +``` + +So far we've only used our helper functions in the first argument of `where` but you can use them anywhere: + +```ts +const persons = await db + .selectFrom('person') + .innerJoin('pet', (join) => join.on(eb => eb( + 'person.first_name', '=', lower(eb.ref('pet.name')) + ))) + .select(({ ref, val }) => [ + 'first_name', + // If you use a helper in `select`, you need to always provide an explicit + // name for it using the `as` method. + concat(ref('person.first_name'), val(' '), ref('pet.name')).as('name_with_pet') + ]) + .orderBy(({ ref }) => lower(ref('first_name'))) + .execute() +``` + +## Reusable helpers using `ExpressionBuilder` + +Here's an example of a helper function that uses the expression builder instead of raw SQL: + +```ts +import { Expression, expressionBuilder } from 'kysely' + +function idsOfPersonsThatHaveDogNamed(name: Expression) { + const eb = expressionBuilder() + + // A subquery that returns the identifiers of all persons + // that have a dog named `name`. + return eb + .selectFrom('pet') + .select('pet.owner_id') + .where('pet.species', '=', 'dog') + .where('pet.name', '=', name) +} +``` + +And here's how you could use it: + +```ts +const dogName = 'Doggo' + +const persons = await db + .selectFrom('person') + .selectAll('person') + .where((eb) => eb( + 'person.id', 'in', idsOfPersonsThatHaveDogNamed(eb.val(dogName)) + )) + .execute() +``` + +Note that `idsOfPersonsThatHaveDogNamed` doesn't execute a separate query but instead returns a subquery expression that's compiled as a part of the parent query: + +```sql +select + person.* +from + person +where + person.id in ( + select pet.owner_id + from pet + where pet.species = 'dog' + and pet.name = ? + ) +``` + +In all our examples we've used the following syntax: + +```ts +.where(eb => eb(left, operator, right)) +``` + +When the expression builder `eb` is used as a function, it creates a binary expression. All binary expressions with a comparison operator are represented as a `Expression`. You don't always need to return `eb(left, operator, right)` from the callback though. Since `Expressions` are composable and reusable, you can return any `Expression`. + +This means you can create helpers like this: + +```ts +function isOlderThan(age: Expression) { + return sql`age > ${age}` +} +``` + +```ts +const persons = await db + .selectFrom('person') + .select(['id', 'first_name']) + .where(({ val }) => isOlderThan(val(60))) + .execute() +``` + +## Dealing with nullable expressions + +If you want your helpers to work with nullable expressions (nullable columns etc.), you can do something like this: + +```ts +import { Expression } from 'kysely' + +// This function accepts both nullable and non-nullable string expressions. +function toInt(expr: Expression) { + // This returns `Expression` if `expr` is nullable + // and `Expression` otherwise. + return sql`(${expr})::integer` +} +``` + +## Passing select queries as expressions + +Let's say we have the following query: + +```ts +const expr: Expression<{ name: string }> = db + .selectFrom('pet') + .select('pet.name') +``` + +The expression type of our query is `Expression<{ name: string }>` but SQL allows you to use a query like that as an `Expression`. In other words, SQL allows you to use single-column record types like scalars. Most of the time Kysely is able to automatically handle this case but with helper functions you need to use `$asScalar()` to convert the type. Here's an example: + +```ts +const persons = await db + .selectFrom('person') + .select((eb) => [ + 'id', + 'first_name', + upper( + eb.selectFrom('pet') + .select('name') + .whereRef('person.id', '=', 'pet.owner_id') + .limit(1) + .$asScalar() // <-- This is needed + .$notNull() + ).as('pet_name') + ]) +``` + +The subquery is an `Expression<{ name: string }>` but our `upper` function only accepts `Expression`. That's why we need to call `$asScalar()`. `$asScalar()` has no effect on the generated SQL. It's simply a type-level helper. + +We also used `$notNull()` in the example because our simple `upper` function doesn't support nullable expressions. \ No newline at end of file diff --git a/site/docs/recipes/0006-expressions.md b/site/docs/recipes/0006-expressions.md index 3ac86cead..154eb88a6 100644 --- a/site/docs/recipes/0006-expressions.md +++ b/site/docs/recipes/0006-expressions.md @@ -6,9 +6,9 @@ An [`Expression`](https://kysely-org.github.io/kysely-apidoc/interfaces/Expre ## Expression builder -Expressions are usually built using an instance of [`ExpressionBuilder`](https://kysely-org.github.io/kysely-apidoc/interfaces/ExpressionBuilder.html). `DB` is the same database type you give to `Kysely` when you create an instance. `TB` is the union of all table names that are visible in the context. For example `ExpressionBuilder` means you can access `person` and `pet` tables and all their columns in the expression. +Expressions are usually built using an instance of [`ExpressionBuilder`](https://kysely-org.github.io/kysely-apidoc/interfaces/ExpressionBuilder.html). `DB` is the same database type you give to `Kysely` when you create an instance. `TB` is the union of all table names that are visible in the context. For example `ExpressionBuilder` means you can reference `person` and `pet` columns in the created expressions. -You can get an instance of the expression builder by using a callback: +You can get an instance of the expression builder using a callback: ```ts const person = await db @@ -28,7 +28,13 @@ const person = await db .as('pet_name'), // Select a boolean expression - eb('first_name', '=', 'Jennifer').as('is_jennifer') + eb('first_name', '=', 'Jennifer').as('is_jennifer'), + + // Select a static string value + eb.val('Some value').as('string_value'), + + // Select a literal value + eb.lit(42).as('literal_value'), ]) // You can also destructure the expression builder like this .where(({ and, or, eb, not, exists, selectFrom }) => or([ @@ -63,19 +69,21 @@ select limit 1 ) as "pet_name", - "first_name" = $1 as "is_jennifer" + "first_name" = $1 as "is_jennifer", + $2 as "string_value", + 42 as "literal_value" from "person" where ( ( - "first_name" = $2 - and "last_name" = $3 + "first_name" = $3 + and "last_name" = $4 ) or not exists ( select "pet.id" from "pet" where "pet"."owner_id" = "person"."id" - and "pet"."species" in ($4, $5) + and "pet"."species" in ($5, $6) ) ) ``` @@ -91,11 +99,17 @@ There's also a global function `expressionBuilder` you can use to create express ```ts import { expressionBuilder } from 'kysely' -// `eb1` has type `ExpressionBuilder` -const eb1 = expressionBuilder() +// `eb1` has type `ExpressionBuilder` which means there are no tables in the +// context. This variant should be used most of the time in helper functions since you +// shouldn't make assumptions about the calling context. +const eb1 = expressionBuilder() + +// `eb2` has type `ExpressionBuilder`. You can reference `person` columns +// directly in all expression builder methods. +const eb2 = expressionBuilder() // In this one you'd have access to tables `person` and `pet` and all their columns. -const eb2 = expressionBuilder() +const eb3 = expressionBuilder() let qb = query .selectFrom('person') @@ -141,7 +155,7 @@ const doggoPersons = await db .execute() ``` -The above helper is not very type-safe. The following code would compile, but fail at runtime: +However, the above helper is not very type-safe. The following code would compile, but fail at runtime: ```ts const bigFatFailure = await db @@ -160,7 +174,7 @@ in arbitrary expressions instead of just values. function hasDogNamed(name: Expression, ownerId: Expression) { // Create an expression builder without any tables in the context. // This way we make no assumptions about the calling context. - const eb = expressionBuilder() + const eb = expressionBuilder() return eb.exists( eb.selectFrom('pet') @@ -182,11 +196,13 @@ const doggoPersons = await db .execute() ``` +Learn more about reusable helper functions [here](https://kysely.dev/docs/recipes/reusable-helpers). + ## Conditional expressions In the following, we'll only cover `where` expressions. The same logic applies to `having`, `on`, `orderBy`, `groupBy` etc. -> This section should not be confused with conditional selections in `select` clauses, which is a whole 'nother topic we discuss in [this recipe](https://www.kysely.dev/docs/recipes/conditional-selects). +> This section should not be confused with conditional selections in `select` clauses, which is a whole 'nother topic we discuss in [this recipe](https://kysely.dev/docs/recipes/conditional-selects). Having a set of optional filters you want to combine using `and`, is the most basic and common use case of conditional `where` expressions. Since the `where`, `having` and other filter functions are additive, most of the time this is enough: diff --git a/src/dialect/mssql/mssql-dialect-config.ts b/src/dialect/mssql/mssql-dialect-config.ts index 197610ba3..e4af5ab48 100644 --- a/src/dialect/mssql/mssql-dialect-config.ts +++ b/src/dialect/mssql/mssql-dialect-config.ts @@ -67,17 +67,20 @@ export interface Tedious { export interface TediousConnection { beginTransaction( - callback: (error?: Error | null, transactionDescriptor?: any) => void, - name?: string, - isolationLevel?: number, + callback: ( + err: Error | null | undefined, + transactionDescriptor?: any, + ) => void, + name?: string | undefined, + isolationLevel?: number | undefined, ): void cancel(): boolean close(): void commitTransaction( - callback: (error?: Error | null) => void, - name?: string, + callback: (err: Error | null | undefined) => void, + name?: string | undefined, ): void - connect(callback?: (error?: Error) => void): void + connect(connectListener: (err?: Error) => void): void execSql(request: TediousRequest): void off(event: 'error', listener: (error: unknown) => void): this off(event: string, listener: (...args: any[]) => void): this @@ -85,12 +88,15 @@ export interface TediousConnection { on(event: string, listener: (...args: any[]) => void): this once(event: 'end', listener: () => void): this once(event: string, listener: (...args: any[]) => void): this - reset(callback: (error?: Error | null) => void): void + reset(callback: (err: Error | null | undefined) => void): void rollbackTransaction( - callback: (error?: Error | null) => void, - name?: string, + callback: (err: Error | null | undefined) => void, + name?: string | undefined, + ): void + saveTransaction( + callback: (err: Error | null | undefined) => void, + name: string, ): void - saveTransaction(callback: (error?: Error | null) => void, name: string): void } export type TediousIsolationLevel = Record diff --git a/src/dialect/mssql/mssql-driver.ts b/src/dialect/mssql/mssql-driver.ts index b9d44e203..8ba60841e 100644 --- a/src/dialect/mssql/mssql-driver.ts +++ b/src/dialect/mssql/mssql-driver.ts @@ -86,6 +86,20 @@ export class MssqlDriver implements Driver { await connection.rollbackTransaction() } + async savepoint( + connection: MssqlConnection, + savepointName: string, + ): Promise { + await connection.savepoint(savepointName) + } + + async rollbackToSavepoint( + connection: MssqlConnection, + savepointName: string, + ): Promise { + await connection.rollbackTransaction(savepointName) + } + async releaseConnection(connection: MssqlConnection): Promise { await connection[PRIVATE_RELEASE_METHOD]() this.#pool.release(connection) @@ -174,12 +188,21 @@ class MssqlConnection implements DatabaseConnection { } } - async rollbackTransaction(): Promise { + async rollbackTransaction(savepointName?: string): Promise { await new Promise((resolve, reject) => this.#connection.rollbackTransaction((error) => { if (error) reject(error) else resolve(undefined) - }), + }, savepointName), + ) + } + + async savepoint(savepointName: string): Promise { + await new Promise((resolve, reject) => + this.#connection.saveTransaction((error) => { + if (error) reject(error) + else resolve(undefined) + }, savepointName), ) } diff --git a/src/dialect/mysql/mysql-driver.ts b/src/dialect/mysql/mysql-driver.ts index 063d84ae0..084b6cb6f 100644 --- a/src/dialect/mysql/mysql-driver.ts +++ b/src/dialect/mysql/mysql-driver.ts @@ -3,7 +3,9 @@ import { QueryResult, } from '../../driver/database-connection.js' import { Driver, TransactionSettings } from '../../driver/driver.js' +import { parseSavepointCommand } from '../../parser/savepoint-parser.js' import { CompiledQuery } from '../../query-compiler/compiled-query.js' +import { QueryCompiler } from '../../query-compiler/query-compiler.js' import { isFunction, isObject, freeze } from '../../util/object-utils.js' import { extendStackTrace } from '../../util/stack-trace-utils.js' import { @@ -90,6 +92,36 @@ export class MysqlDriver implements Driver { await connection.executeQuery(CompiledQuery.raw('rollback')) } + async savepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('savepoint', savepointName)), + ) + } + + async rollbackToSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('rollback to', savepointName)), + ) + } + + async releaseSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('release savepoint', savepointName)), + ) + } + async releaseConnection(connection: MysqlConnection): Promise { connection[PRIVATE_RELEASE_METHOD]() } diff --git a/src/dialect/postgres/postgres-driver.ts b/src/dialect/postgres/postgres-driver.ts index 7b6639fe2..0321e548b 100644 --- a/src/dialect/postgres/postgres-driver.ts +++ b/src/dialect/postgres/postgres-driver.ts @@ -3,7 +3,14 @@ import { QueryResult, } from '../../driver/database-connection.js' import { Driver, TransactionSettings } from '../../driver/driver.js' +import { IdentifierNode } from '../../operation-node/identifier-node.js' +import { RawNode } from '../../operation-node/raw-node.js' +import { parseSavepointCommand } from '../../parser/savepoint-parser.js' import { CompiledQuery } from '../../query-compiler/compiled-query.js' +import { + QueryCompiler, + RootOperationNode, +} from '../../query-compiler/query-compiler.js' import { isFunction, freeze } from '../../util/object-utils.js' import { extendStackTrace } from '../../util/stack-trace-utils.js' import { @@ -78,6 +85,36 @@ export class PostgresDriver implements Driver { await connection.executeQuery(CompiledQuery.raw('rollback')) } + async savepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('savepoint', savepointName)), + ) + } + + async rollbackToSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('rollback to', savepointName)), + ) + } + + async releaseSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('release', savepointName)), + ) + } + async releaseConnection(connection: PostgresConnection): Promise { connection[PRIVATE_RELEASE_METHOD]() } diff --git a/src/dialect/sqlite/sqlite-driver.ts b/src/dialect/sqlite/sqlite-driver.ts index dcfbca2e6..5aefb32ef 100644 --- a/src/dialect/sqlite/sqlite-driver.ts +++ b/src/dialect/sqlite/sqlite-driver.ts @@ -4,7 +4,9 @@ import { } from '../../driver/database-connection.js' import { Driver } from '../../driver/driver.js' import { SelectQueryNode } from '../../operation-node/select-query-node.js' +import { parseSavepointCommand } from '../../parser/savepoint-parser.js' import { CompiledQuery } from '../../query-compiler/compiled-query.js' +import { QueryCompiler } from '../../query-compiler/query-compiler.js' import { freeze, isFunction } from '../../util/object-utils.js' import { SqliteDatabase, SqliteDialectConfig } from './sqlite-dialect-config.js' @@ -50,6 +52,36 @@ export class SqliteDriver implements Driver { await connection.executeQuery(CompiledQuery.raw('rollback')) } + async savepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('savepoint', savepointName)), + ) + } + + async rollbackToSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('rollback to', savepointName)), + ) + } + + async releaseSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + await connection.executeQuery( + compileQuery(parseSavepointCommand('release', savepointName)), + ) + } + async releaseConnection(): Promise { this.#connectionMutex.unlock() } diff --git a/src/driver/driver.ts b/src/driver/driver.ts index ef9214d17..849cd0129 100644 --- a/src/driver/driver.ts +++ b/src/driver/driver.ts @@ -1,3 +1,4 @@ +import { QueryCompiler } from '../query-compiler/query-compiler.js' import { ArrayItemType } from '../util/type-utils.js' import { DatabaseConnection } from './database-connection.js' @@ -37,6 +38,33 @@ export interface Driver { */ rollbackTransaction(connection: DatabaseConnection): Promise + /** + * Establishses a new savepoint within a transaction. + */ + savepoint?( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise + + /** + * Rolls back to a savepoint within a transaction. + */ + rollbackToSavepoint?( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise + + /** + * Releases a savepoint within a transaction. + */ + releaseSavepoint?( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise + /** * Releases a connection back to the pool. */ diff --git a/src/driver/dummy-driver.ts b/src/driver/dummy-driver.ts index 4a4d00fe6..7a457c8bb 100644 --- a/src/driver/dummy-driver.ts +++ b/src/driver/dummy-driver.ts @@ -65,6 +65,18 @@ export class DummyDriver implements Driver { async destroy(): Promise { // Nothing to do here. } + + async releaseSavepoint(): Promise { + // Nothing to do here. + } + + async rollbackToSavepoint(): Promise { + // Nothing to do here. + } + + async savepoint(): Promise { + // Nothing to do here. + } } class DummyConnection implements DatabaseConnection { diff --git a/src/driver/runtime-driver.ts b/src/driver/runtime-driver.ts index a7ba8d771..d05467ccf 100644 --- a/src/driver/runtime-driver.ts +++ b/src/driver/runtime-driver.ts @@ -1,4 +1,5 @@ import { CompiledQuery } from '../query-compiler/compiled-query.js' +import { QueryCompiler } from '../query-compiler/query-compiler.js' import { Log } from '../util/log.js' import { performanceNow } from '../util/performance-now.js' import { DatabaseConnection, QueryResult } from './database-connection.js' @@ -85,6 +86,54 @@ export class RuntimeDriver implements Driver { return this.#driver.rollbackTransaction(connection) } + savepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + if (this.#driver.savepoint) { + return this.#driver.savepoint(connection, savepointName, compileQuery) + } + + throw new Error('The `savepoint` method is not supported by this driver') + } + + rollbackToSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + if (this.#driver.rollbackToSavepoint) { + return this.#driver.rollbackToSavepoint( + connection, + savepointName, + compileQuery, + ) + } + + throw new Error( + 'The `rollbackToSavepoint` method is not supported by this driver', + ) + } + + releaseSavepoint( + connection: DatabaseConnection, + savepointName: string, + compileQuery: QueryCompiler['compileQuery'], + ): Promise { + if (this.#driver.releaseSavepoint) { + return this.#driver.releaseSavepoint( + connection, + savepointName, + compileQuery, + ) + } + + throw new Error( + 'The `releaseSavepoint` method is not supported by this driver', + ) + } + async destroy(): Promise { if (!this.#initPromise) { return diff --git a/src/expression/expression-builder.ts b/src/expression/expression-builder.ts index c3faa4c57..ea760bf2e 100644 --- a/src/expression/expression-builder.ts +++ b/src/expression/expression-builder.ts @@ -5,13 +5,7 @@ import { import { SelectQueryNode } from '../operation-node/select-query-node.js' import { parseTableExpressionOrList, - TableExpression, - From, TableExpressionOrList, - FromTables, - ExtractTableAlias, - AnyAliasedTable, - PickTableWithAlias, parseTable, } from '../parser/table-parser.js' import { WithSchemaPlugin } from '../plugin/with-schema/with-schema-plugin.js' @@ -75,7 +69,7 @@ import { ValTuple5, } from '../parser/tuple-parser.js' import { TupleNode } from '../operation-node/tuple-node.js' -import { Selectable } from '../util/column-type.js' +import { Selectable, Serialized } from '../util/column-type.js' import { JSONPathNode } from '../operation-node/json-path-node.js' import { KyselyTypeError } from '../util/type-error.js' import { @@ -83,6 +77,8 @@ import { parseDataTypeExpression, } from '../parser/data-type-parser.js' import { CastNode } from '../operation-node/cast-node.js' +import { SelectFrom } from '../parser/select-from-parser.js' +import { ValueNode } from '../operation-node/value-node.js' export interface ExpressionBuilder { /** @@ -151,7 +147,7 @@ export interface ExpressionBuilder { * eb.selectFrom('person') * .selectAll() * .where((eb) => eb( - * eb.fn('lower', ['first_name']), + * eb.fn('lower', ['first_name']), * 'in', * eb.selectFrom('pet') * .select('pet.name') @@ -182,12 +178,12 @@ export interface ExpressionBuilder { * * ```ts * db.selectFrom('person') + * .selectAll() * .where(({ eb, exists, selectFrom }) => - * eb('first_name', '=', 'Jennifer').and( - * exists(selectFrom('pet').whereRef('owner_id', '=', 'person.id').select('pet.id')) - * ) + * eb('first_name', '=', 'Jennifer').and(exists( + * selectFrom('pet').whereRef('owner_id', '=', 'person.id').select('pet.id') + * )) * ) - * .selectAll() * ``` * * The generated SQL (PostgreSQL): @@ -277,29 +273,9 @@ export interface ExpressionBuilder { * that case Kysely typings wouldn't allow you to reference `pet.owner_id` * because `pet` is not joined to that query. */ - selectFrom( - from: TE[], - ): SelectQueryBuilder, {}> - - selectFrom>( - from: TE[], - ): SelectQueryBuilder, FromTables, {}> - - selectFrom( - from: TE, - ): SelectQueryBuilder, {}> - - selectFrom>( + selectFrom>( from: TE, - ): SelectQueryBuilder< - DB & PickTableWithAlias, - TB | ExtractTableAlias, TE>, - {} - > - - selectFrom>( - from: TE, - ): SelectQueryBuilder, FromTables, {}> + ): SelectFrom /** * Creates a `case` statement/operator. @@ -536,6 +512,44 @@ export interface ExpressionBuilder { value: VE, ): ExpressionWrapper> + /** + * Returns a value expression that will be serialized before being passed to the database. + * + * This can be used to pass in an object/array value when inserting/updating a + * value to a column defined with `Json`. + * + * Default serializer function is `JSON.stringify`. + * + * ### Example + * + * ```ts + * import { GeneratedAlways, Json } from 'kysely' + * + * interface Database { + * person: { + * id: GeneratedAlways + * name: string + * experience: Json<{ title: string; company: string }[]> + * preferences: Json<{ locale: string; timezone: string }> + * profile: Json<{ email_verified: boolean }> + * } + * } + * + * const result = await db + * .insertInto('person') + * .values(({ valJson }) => ({ + * name: 'Jennifer Aniston', + * experience: valJson([{ title: 'Software Engineer', company: 'Google' }]), // ✔️ + * preferences: valJson({ locale: 'en' }), // ❌ missing `timezone` + * profile: JSON.stringify({ email_verified: true }), // ❌ doesn't match `Serialized<{ email_verified }>` + * })) + * .execute() + * ``` + */ + valJson( + obj: O, + ): ExpressionWrapper> + /** * Creates a tuple expression. * @@ -1165,6 +1179,14 @@ export function createExpressionBuilder( return new ExpressionWrapper(parseValueExpression(value)) }, + valJson( + value: O, + ): ExpressionWrapper> { + return new ExpressionWrapper( + ValueNode.create(value, { serialized: true }), + ) + }, + refTuple( ...values: ReadonlyArray> ): ExpressionWrapper { @@ -1311,10 +1333,10 @@ export function expressionBuilder( _: SelectQueryBuilder, ): ExpressionBuilder -export function expressionBuilder(): ExpressionBuilder< +export function expressionBuilder< DB, - TB -> + TB extends keyof DB = never, +>(): ExpressionBuilder export function expressionBuilder( _?: unknown, diff --git a/src/index.ts b/src/index.ts index 9818f1131..b467d871c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -53,6 +53,7 @@ export * from './schema/column-definition-builder.js' export * from './schema/foreign-key-constraint-builder.js' export * from './schema/alter-table-builder.js' export * from './schema/create-view-builder.js' +export * from './schema/refresh-materialized-view-builder.js' export * from './schema/drop-view-builder.js' export * from './schema/alter-column-builder.js' @@ -133,6 +134,7 @@ export * from './operation-node/create-schema-node.js' export * from './operation-node/create-table-node.js' export * from './operation-node/create-type-node.js' export * from './operation-node/create-view-node.js' +export * from './operation-node/refresh-materialized-view-node.js' export * from './operation-node/data-type-node.js' export * from './operation-node/default-insert-value-node.js' export * from './operation-node/default-value-node.js' diff --git a/src/kysely.ts b/src/kysely.ts index 987c8947e..7676c0336 100644 --- a/src/kysely.ts +++ b/src/kysely.ts @@ -16,7 +16,6 @@ import { TransactionSettings, TRANSACTION_ISOLATION_LEVELS, } from './driver/driver.js' -import { preventAwait } from './util/prevent-await.js' import { createFunctionModule, FunctionModule, @@ -33,6 +32,18 @@ import { parseExpression } from './parser/expression-parser.js' import { Expression } from './expression/expression.js' import { WithSchemaPlugin } from './plugin/with-schema/with-schema-plugin.js' import { DrainOuterGeneric } from './util/type-utils.js' +import { QueryCompiler } from './query-compiler/query-compiler.js' +import { + ReleaseSavepoint, + RollbackToSavepoint, +} from './parser/savepoint-parser.js' +import { + ControlledConnection, + provideControlledConnection, +} from './util/provide-controlled-connection.js' + +// @ts-ignore +Symbol.asyncDispose ??= Symbol('Symbol.asyncDispose') /** * The main Kysely class. @@ -79,7 +90,7 @@ import { DrainOuterGeneric } from './util/type-utils.js' */ export class Kysely extends QueryCreator - implements QueryExecutorProvider + implements QueryExecutorProvider, AsyncDisposable { readonly #props: KyselyProps @@ -211,6 +222,9 @@ export class Kysely * of type {@link Transaction} which inherits {@link Kysely}. Any query * started through the transaction object is executed inside the transaction. * + * To run a controlled transaction, allowing you to commit and rollback manually, + * use {@link startTransaction} instead. + * * ### Examples * * @@ -260,6 +274,122 @@ export class Kysely return new TransactionBuilder({ ...this.#props }) } + /** + * Creates a {@link ControlledTransactionBuilder} that can be used to run queries inside a controlled transaction. + * + * The returned {@link ControlledTransactionBuilder} can be used to configure the transaction. + * The {@link ControlledTransactionBuilder.execute} method can then be called + * to start the transaction and return a {@link ControlledTransaction}. + * + * A {@link ControlledTransaction} allows you to commit and rollback manually, + * execute savepoint commands. It extends {@link Transaction} which extends {@link Kysely}, + * so you can run queries inside the transaction. Once the transaction is committed, + * or rolled back, it can't be used anymore - all queries will throw an error. + * This is to prevent accidentally running queries outside the transaction - where + * atomicity is not guaranteed anymore. + * + * ### Examples + * + * + * + * A controlled transaction allows you to commit and rollback manually, execute + * savepoint commands, and queries in general. + * + * In this example we start a transaction, use it to insert two rows and then commit + * the transaction. If an error is thrown, we catch it and rollback the transaction. + * + * ```ts + * const trx = await db.startTransaction().execute() + * + * try { + * const jennifer = await trx.insertInto('person') + * .values({ + * first_name: 'Jennifer', + * last_name: 'Aniston', + * age: 40, + * }) + * .returning('id') + * .executeTakeFirstOrThrow() + * + * const catto = await trx.insertInto('pet') + * .values({ + * owner_id: jennifer.id, + * name: 'Catto', + * species: 'cat', + * is_favorite: false, + * }) + * .returningAll() + * .executeTakeFirstOrThrow() + * + * await trx.commit().execute() + * + * return catto + * } catch (error) { + * await trx.rollback().execute() + * } + * ``` + * + * + * + * A controlled transaction allows you to commit and rollback manually, execute + * savepoint commands, and queries in general. + * + * In this example we start a transaction, insert a person, create a savepoint, + * try inserting a toy and a pet, and if an error is thrown, we rollback to the + * savepoint. Eventually we release the savepoint, insert an audit record and + * commit the transaction. If an error is thrown, we catch it and rollback the + * transaction. + * + * ```ts + * const trx = await db.startTransaction().execute() + * + * try { + * const jennifer = await trx + * .insertInto('person') + * .values({ + * first_name: 'Jennifer', + * last_name: 'Aniston', + * age: 40, + * }) + * .returning('id') + * .executeTakeFirstOrThrow() + * + * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() + * + * try { + * const bone = await trxAfterJennifer + * .insertInto('toy') + * .values({ name: 'Bone', price: 1.99 }) + * .returning('id') + * .executeTakeFirstOrThrow() + * + * await trxAfterJennifer + * .insertInto('pet') + * .values({ + * owner_id: jennifer.id, + * name: 'Catto', + * species: 'cat', + * favorite_toy_id: bone.id, + * }) + * .execute() + * } catch (error) { + * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() + * } + * + * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() + * + * await trx.insertInto('audit').values({ action: 'added Jennifer' }).execute() + * + * await trx.commit().execute() + * } catch (error) { + * await trx.rollback().execute() + * } + * ``` + */ + startTransaction(): ControlledTransactionBuilder { + return new ControlledTransactionBuilder({ ...this.#props }) + } + /** * Provides a kysely instance bound to a single database connection. * @@ -388,6 +518,10 @@ export class Kysely return this.getExecutor().executeQuery(compiledQuery, queryId) } + + async [Symbol.asyncDispose]() { + await this.destroy() + } } export class Transaction extends Kysely { @@ -532,11 +666,6 @@ export class ConnectionBuilder { interface ConnectionBuilderProps extends KyselyProps {} -preventAwait( - ConnectionBuilder, - "don't await ConnectionBuilder instances directly. To execute the query you need to call the `execute` method", -) - export class TransactionBuilder { readonly #props: TransactionBuilderProps @@ -585,11 +714,6 @@ interface TransactionBuilderProps extends KyselyProps { readonly isolationLevel?: IsolationLevel } -preventAwait( - TransactionBuilder, - "don't await TransactionBuilder instances directly. To execute the transaction you need to call the `execute` method", -) - function validateTransactionSettings(settings: TransactionSettings): void { if ( settings.isolationLevel && @@ -600,3 +724,325 @@ function validateTransactionSettings(settings: TransactionSettings): void { ) } } + +export class ControlledTransactionBuilder { + readonly #props: ControlledTransactionBuilderProps + + constructor(props: ControlledTransactionBuilderProps) { + this.#props = freeze(props) + } + + setIsolationLevel( + isolationLevel: IsolationLevel, + ): ControlledTransactionBuilder { + return new ControlledTransactionBuilder({ + ...this.#props, + isolationLevel, + }) + } + + async execute(): Promise> { + const { isolationLevel, ...props } = this.#props + const settings = { isolationLevel } + + validateTransactionSettings(settings) + + const connection = await provideControlledConnection(this.#props.executor) + + await this.#props.driver.beginTransaction(connection, settings) + + return new ControlledTransaction({ + ...props, + connection, + executor: this.#props.executor.withConnectionProvider( + new SingleConnectionProvider(connection), + ), + }) + } +} + +interface ControlledTransactionBuilderProps extends TransactionBuilderProps { + readonly releaseConnection?: boolean +} + +export class ControlledTransaction< + DB, + S extends string[] = [], +> extends Transaction { + readonly #props: ControlledTransactionProps + readonly #compileQuery: QueryCompiler['compileQuery'] + #isCommitted: boolean + #isRolledBack: boolean + + constructor(props: ControlledTransactionProps) { + const { connection, ...transactionProps } = props + super(transactionProps) + this.#props = freeze(props) + + const queryId = createQueryId() + this.#compileQuery = (node) => props.executor.compileQuery(node, queryId) + + this.#isCommitted = false + this.#isRolledBack = false + + this.#assertNotCommittedOrRolledBackBeforeAllExecutions() + } + + get isCommitted(): boolean { + return this.#isCommitted + } + + get isRolledBack(): boolean { + return this.#isRolledBack + } + + /** + * Commits the transaction. + * + * See {@link rollback}. + * + * ### Examples + * + * ```ts + * try { + * await doSomething(trx) + * + * await trx.commit().execute() + * } catch (error) { + * await trx.rollback().execute() + * } + * ``` + */ + commit(): Command { + this.#assertNotCommittedOrRolledBack() + + return new Command(async () => { + await this.#props.driver.commitTransaction(this.#props.connection) + this.#isCommitted = true + this.#props.connection.release() + }) + } + + /** + * Rolls back the transaction. + * + * See {@link commit} and {@link rollbackToSavepoint}. + * + * ### Examples + * + * ```ts + * try { + * await doSomething(trx) + * + * await trx.commit().execute() + * } catch (error) { + * await trx.rollback().execute() + * } + * ``` + */ + rollback(): Command { + this.#assertNotCommittedOrRolledBack() + + return new Command(async () => { + await this.#props.driver.rollbackTransaction(this.#props.connection) + this.#isRolledBack = true + this.#props.connection.release() + }) + } + + /** + * Creates a savepoint with a given name. + * + * See {@link rollbackToSavepoint} and {@link releaseSavepoint}. + * + * For a type-safe experience, you should use the returned instance from now on. + * + * ### Examples + * + * ```ts + * await insertJennifer(trx) + * + * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() + * + * try { + * await doSomething(trxAfterJennifer) + * } catch (error) { + * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() + * } + * ``` + */ + savepoint( + savepointName: SN extends S ? never : SN, + ): Command> { + this.#assertNotCommittedOrRolledBack() + + return new Command(async () => { + await this.#props.driver.savepoint?.( + this.#props.connection, + savepointName, + this.#compileQuery, + ) + + return new ControlledTransaction({ ...this.#props }) + }) + } + + /** + * Rolls back to a savepoint with a given name. + * + * See {@link savepoint} and {@link releaseSavepoint}. + * + * You must use the same instance returned by {@link savepoint}, or + * escape the type-check by using `as any`. + * + * ### Examples + * + * ```ts + * await insertJennifer(trx) + * + * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() + * + * try { + * await doSomething(trxAfterJennifer) + * } catch (error) { + * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() + * } + * ``` + */ + rollbackToSavepoint( + savepointName: SN, + ): RollbackToSavepoint extends string[] + ? Command>> + : never { + this.#assertNotCommittedOrRolledBack() + + return new Command(async () => { + await this.#props.driver.rollbackToSavepoint?.( + this.#props.connection, + savepointName, + this.#compileQuery, + ) + + return new ControlledTransaction({ ...this.#props }) + }) as any + } + + /** + * Releases a savepoint with a given name. + * + * See {@link savepoint} and {@link rollbackToSavepoint}. + * + * You must use the same instance returned by {@link savepoint}, or + * escape the type-check by using `as any`. + * + * ### Examples + * + * ```ts + * await insertJennifer(trx) + * + * const trxAfterJennifer = await trx.savepoint('after_jennifer').execute() + * + * try { + * await doSomething(trxAfterJennifer) + * } catch (error) { + * await trxAfterJennifer.rollbackToSavepoint('after_jennifer').execute() + * } + * + * await trxAfterJennifer.releaseSavepoint('after_jennifer').execute() + * + * await doSomethingElse(trx) + * ``` + */ + releaseSavepoint( + savepointName: SN, + ): ReleaseSavepoint extends string[] + ? Command>> + : never { + this.#assertNotCommittedOrRolledBack() + + return new Command(async () => { + await this.#props.driver.releaseSavepoint?.( + this.#props.connection, + savepointName, + this.#compileQuery, + ) + + return new ControlledTransaction({ ...this.#props }) + }) as any + } + + override withPlugin(plugin: KyselyPlugin): ControlledTransaction { + return new ControlledTransaction({ + ...this.#props, + executor: this.#props.executor.withPlugin(plugin), + }) + } + + override withoutPlugins(): ControlledTransaction { + return new ControlledTransaction({ + ...this.#props, + executor: this.#props.executor.withoutPlugins(), + }) + } + + override withSchema(schema: string): ControlledTransaction { + return new ControlledTransaction({ + ...this.#props, + executor: this.#props.executor.withPluginAtFront( + new WithSchemaPlugin(schema), + ), + }) + } + + override withTables< + T extends Record>, + >(): ControlledTransaction, S> { + return new ControlledTransaction({ ...this.#props }) + } + + #assertNotCommittedOrRolledBackBeforeAllExecutions() { + const { executor } = this.#props + + const originalExecuteQuery = executor.executeQuery.bind(executor) + executor.executeQuery = async (query, queryId) => { + this.#assertNotCommittedOrRolledBack() + return await originalExecuteQuery(query, queryId) + } + + const that = this + const originalStream = executor.stream.bind(executor) + executor.stream = (query, chunkSize, queryId) => { + that.#assertNotCommittedOrRolledBack() + return originalStream(query, chunkSize, queryId) + } + } + + #assertNotCommittedOrRolledBack(): void { + if (this.isCommitted) { + throw new Error('Transaction is already committed') + } + + if (this.isRolledBack) { + throw new Error('Transaction is already rolled back') + } + } +} + +interface ControlledTransactionProps extends KyselyProps { + readonly connection: ControlledConnection +} + +export class Command { + readonly #cb: () => Promise + + constructor(cb: () => Promise) { + this.#cb = cb + } + + /** + * Executes the command. + */ + async execute(): Promise { + return await this.#cb() + } +} diff --git a/src/operation-node/operation-node-transformer.ts b/src/operation-node/operation-node-transformer.ts index ec7a01971..129496292 100644 --- a/src/operation-node/operation-node-transformer.ts +++ b/src/operation-node/operation-node-transformer.ts @@ -94,6 +94,7 @@ import { CastNode } from './cast-node.js' import { FetchNode } from './fetch-node.js' import { TopNode } from './top-node.js' import { OutputNode } from './output-node.js' +import { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js' /** * Transforms an operation node tree into another one. @@ -189,6 +190,8 @@ export class OperationNodeTransformer { DropConstraintNode: this.transformDropConstraint.bind(this), ForeignKeyConstraintNode: this.transformForeignKeyConstraint.bind(this), CreateViewNode: this.transformCreateView.bind(this), + RefreshMaterializedViewNode: + this.transformRefreshMaterializedView.bind(this), DropViewNode: this.transformDropView.bind(this), GeneratedNode: this.transformGenerated.bind(this), DefaultValueNode: this.transformDefaultValue.bind(this), @@ -796,6 +799,17 @@ export class OperationNodeTransformer { }) } + protected transformRefreshMaterializedView( + node: RefreshMaterializedViewNode, + ): RefreshMaterializedViewNode { + return requireAllProps({ + kind: 'RefreshMaterializedViewNode', + name: this.transformNode(node.name), + concurrently: node.concurrently, + withNoData: node.withNoData, + }) + } + protected transformDropView(node: DropViewNode): DropViewNode { return requireAllProps({ kind: 'DropViewNode', diff --git a/src/operation-node/operation-node-visitor.ts b/src/operation-node/operation-node-visitor.ts index f88f12539..533f58098 100644 --- a/src/operation-node/operation-node-visitor.ts +++ b/src/operation-node/operation-node-visitor.ts @@ -96,6 +96,7 @@ import { CastNode } from './cast-node.js' import { FetchNode } from './fetch-node.js' import { TopNode } from './top-node.js' import { OutputNode } from './output-node.js' +import { RefreshMaterializedViewNode } from './refresh-materialized-view-node.js' export abstract class OperationNodeVisitor { protected readonly nodeStack: OperationNode[] = [] @@ -166,6 +167,7 @@ export abstract class OperationNodeVisitor { DropConstraintNode: this.visitDropConstraint.bind(this), ForeignKeyConstraintNode: this.visitForeignKeyConstraint.bind(this), CreateViewNode: this.visitCreateView.bind(this), + RefreshMaterializedViewNode: this.visitRefreshMaterializedView.bind(this), DropViewNode: this.visitDropView.bind(this), GeneratedNode: this.visitGenerated.bind(this), DefaultValueNode: this.visitDefaultValue.bind(this), @@ -277,6 +279,9 @@ export abstract class OperationNodeVisitor { protected abstract visitPrimitiveValueList(node: PrimitiveValueListNode): void protected abstract visitOperator(node: OperatorNode): void protected abstract visitCreateView(node: CreateViewNode): void + protected abstract visitRefreshMaterializedView( + node: RefreshMaterializedViewNode, + ): void protected abstract visitDropView(node: DropViewNode): void protected abstract visitGenerated(node: GeneratedNode): void protected abstract visitDefaultValue(node: DefaultValueNode): void diff --git a/src/operation-node/operation-node.ts b/src/operation-node/operation-node.ts index 6476a24eb..7786b7ec1 100644 --- a/src/operation-node/operation-node.ts +++ b/src/operation-node/operation-node.ts @@ -58,6 +58,7 @@ export type OperationNodeKind = | 'AddConstraintNode' | 'DropConstraintNode' | 'CreateViewNode' + | 'RefreshMaterializedViewNode' | 'DropViewNode' | 'GeneratedNode' | 'DefaultValueNode' diff --git a/src/operation-node/refresh-materialized-view-node.ts b/src/operation-node/refresh-materialized-view-node.ts new file mode 100644 index 000000000..e421a087b --- /dev/null +++ b/src/operation-node/refresh-materialized-view-node.ts @@ -0,0 +1,41 @@ +import { freeze } from '../util/object-utils.js' +import { OperationNode } from './operation-node.js' +import { SchemableIdentifierNode } from './schemable-identifier-node.js' + +export type RefreshMaterializedViewNodeParams = Omit< + Partial, + 'kind' | 'name' +> + +export interface RefreshMaterializedViewNode extends OperationNode { + readonly kind: 'RefreshMaterializedViewNode' + readonly name: SchemableIdentifierNode + readonly concurrently?: boolean + readonly withNoData?: boolean +} + +/** + * @internal + */ +export const RefreshMaterializedViewNode = freeze({ + is(node: OperationNode): node is RefreshMaterializedViewNode { + return node.kind === 'RefreshMaterializedViewNode' + }, + + create(name: string): RefreshMaterializedViewNode { + return freeze({ + kind: 'RefreshMaterializedViewNode', + name: SchemableIdentifierNode.create(name), + }) + }, + + cloneWith( + createView: RefreshMaterializedViewNode, + params: RefreshMaterializedViewNodeParams, + ): RefreshMaterializedViewNode { + return freeze({ + ...createView, + ...params, + }) + }, +}) diff --git a/src/operation-node/update-query-node.ts b/src/operation-node/update-query-node.ts index c4188205a..a815a45c9 100644 --- a/src/operation-node/update-query-node.ts +++ b/src/operation-node/update-query-node.ts @@ -12,6 +12,7 @@ import { ExplainNode } from './explain-node.js' import { LimitNode } from './limit-node.js' import { TopNode } from './top-node.js' import { OutputNode } from './output-node.js' +import { ListNode } from './list-node.js' export type UpdateValuesNode = ValueListNode | PrimitiveValueListNode @@ -39,10 +40,15 @@ export const UpdateQueryNode = freeze({ return node.kind === 'UpdateQueryNode' }, - create(table: OperationNode, withNode?: WithNode): UpdateQueryNode { + create( + tables: ReadonlyArray, + withNode?: WithNode, + ): UpdateQueryNode { return freeze({ kind: 'UpdateQueryNode', - table, + // For backwards compatibility, use the raw table node when there's only one table + // and don't rename the property to something like `tables`. + table: tables.length === 1 ? tables[0] : ListNode.create(tables), ...(withNode && { with: withNode }), }) }, diff --git a/src/operation-node/value-node.ts b/src/operation-node/value-node.ts index 2c811d0dd..b492fd46b 100644 --- a/src/operation-node/value-node.ts +++ b/src/operation-node/value-node.ts @@ -5,6 +5,7 @@ export interface ValueNode extends OperationNode { readonly kind: 'ValueNode' readonly value: unknown readonly immediate?: boolean + readonly serialized?: boolean } /** @@ -15,9 +16,10 @@ export const ValueNode = freeze({ return node.kind === 'ValueNode' }, - create(value: unknown): ValueNode { + create(value: unknown, props?: { serialized?: boolean }): ValueNode { return freeze({ kind: 'ValueNode', + ...props, value, }) }, diff --git a/src/parser/delete-from-parser.ts b/src/parser/delete-from-parser.ts new file mode 100644 index 000000000..f46143277 --- /dev/null +++ b/src/parser/delete-from-parser.ts @@ -0,0 +1,30 @@ +import type { DeleteQueryBuilder } from '../query-builder/delete-query-builder.js' +import type { DeleteResult } from '../query-builder/delete-result.js' +import type { ShallowRecord } from '../util/type-utils.js' +import type { + ExtractTableAlias, + From, + FromTables, + TableExpressionOrList, +} from './table-parser.js' + +export type DeleteFrom> = + TE extends ReadonlyArray + ? DeleteQueryBuilder, FromTables, DeleteResult> + : TE extends keyof DB & string + ? // This branch creates a good-looking type for the most common case: + // deleteFrom('person') --> DeleteQueryBuilder. + // ExtractTableAlias is needed for the case where DB == any. Without it: + // deleteFrom('person as p') --> DeleteQueryBuilder + DeleteQueryBuilder, DeleteResult> + : // This branch creates a good-looking type for common aliased case: + // deleteFrom('person as p') --> DeleteQueryBuilder. + TE extends `${infer T} as ${infer A}` + ? T extends keyof DB + ? DeleteQueryBuilder, A, DeleteResult> + : never + : DeleteQueryBuilder< + From, + FromTables, + DeleteResult + > diff --git a/src/parser/merge-into-parser.ts b/src/parser/merge-into-parser.ts new file mode 100644 index 000000000..3a4df1fd3 --- /dev/null +++ b/src/parser/merge-into-parser.ts @@ -0,0 +1,15 @@ +import type { MergeQueryBuilder } from '../query-builder/merge-query-builder.js' +import type { MergeResult } from '../query-builder/merge-result.js' +import type { ShallowRecord } from '../util/type-utils.js' +import type { ExtractTableAlias, SimpleTableReference } from './table-parser.js' + +export type MergeInto< + DB, + TE extends SimpleTableReference, +> = TE extends keyof DB & string + ? MergeQueryBuilder, MergeResult> + : TE extends `${infer T} as ${infer A}` + ? T extends keyof DB + ? MergeQueryBuilder, A, MergeResult> + : never + : never diff --git a/src/parser/savepoint-parser.ts b/src/parser/savepoint-parser.ts new file mode 100644 index 000000000..73297aa1b --- /dev/null +++ b/src/parser/savepoint-parser.ts @@ -0,0 +1,30 @@ +import { IdentifierNode } from '../operation-node/identifier-node.js' +import { RawNode } from '../operation-node/raw-node.js' + +export type RollbackToSavepoint< + S extends string[], + SN extends S[number], +> = S extends [...infer L, infer R] + ? R extends SN + ? S + : RollbackToSavepoint + : never + +export type ReleaseSavepoint< + S extends string[], + SN extends S[number], +> = S extends [...infer L, infer R] + ? R extends SN + ? L + : ReleaseSavepoint + : never + +export function parseSavepointCommand( + command: string, + savepointName: string, +): RawNode { + return RawNode.createWithChildren([ + RawNode.createWithSql(`${command} `), + IdentifierNode.create(savepointName), // ensures savepointName gets sanitized + ]) +} diff --git a/src/parser/select-from-parser.ts b/src/parser/select-from-parser.ts new file mode 100644 index 000000000..521daafd5 --- /dev/null +++ b/src/parser/select-from-parser.ts @@ -0,0 +1,29 @@ +import type { SelectQueryBuilder } from '../query-builder/select-query-builder.js' +import type { ShallowRecord } from '../util/type-utils.js' +import type { + ExtractTableAlias, + From, + FromTables, + TableExpressionOrList, +} from './table-parser.js' + +export type SelectFrom< + DB, + TB extends keyof DB, + TE extends TableExpressionOrList, +> = + TE extends ReadonlyArray + ? SelectQueryBuilder, FromTables, {}> + : TE extends keyof DB & string + ? // This branch creates a good-looking type for the most common case: + // selectFrom('person') --> SelectQueryBuilder. + // ExtractTableAlias is needed for the case where DB == any. Without it: + // selectFrom('person as p') --> SelectQueryBuilder + SelectQueryBuilder, {}> + : // This branch creates a good-looking type for common aliased case: + // selectFrom('person as p') --> SelectQueryBuilder. + TE extends `${infer T} as ${infer A}` + ? T extends keyof DB + ? SelectQueryBuilder, TB | A, {}> + : never + : SelectQueryBuilder, FromTables, {}> diff --git a/src/parser/table-parser.ts b/src/parser/table-parser.ts index 9c665c16e..d9e9fed03 100644 --- a/src/parser/table-parser.ts +++ b/src/parser/table-parser.ts @@ -8,7 +8,7 @@ import { import { IdentifierNode } from '../operation-node/identifier-node.js' import { OperationNode } from '../operation-node/operation-node.js' import { AliasedExpression } from '../expression/expression.js' -import { DrainOuterGeneric, ShallowRecord } from '../util/type-utils.js' +import { DrainOuterGeneric } from '../util/type-utils.js' export type TableExpression = | AnyAliasedTable @@ -19,17 +19,9 @@ export type TableExpressionOrList = | TableExpression | ReadonlyArray> -export type TableReference = - | SimpleTableReference - | AliasedExpression - export type SimpleTableReference = AnyAliasedTable | AnyTable - export type AnyAliasedTable = `${AnyTable} as ${string}` - -export type TableReferenceOrList = - | TableReference - | ReadonlyArray> +export type AnyTable = keyof DB & string export type From = DrainOuterGeneric<{ [C in @@ -56,15 +48,6 @@ export type ExtractTableAlias = TE extends `${string} as ${infer TA}` ? TE : never -export type PickTableWithAlias< - DB, - T extends AnyAliasedTable, -> = T extends `${infer TB} as ${infer A}` - ? TB extends keyof DB - ? ShallowRecord - : never - : never - type ExtractAliasFromTableExpression = TE extends string ? TE extends `${string} as ${infer TA}` ? TA @@ -101,8 +84,6 @@ type ExtractRowTypeFromTableExpression< : never : never -type AnyTable = keyof DB & string - export function parseTableExpressionOrList( table: TableExpressionOrList, ): OperationNode[] { diff --git a/src/parser/update-parser.ts b/src/parser/update-parser.ts new file mode 100644 index 000000000..95f4a0863 --- /dev/null +++ b/src/parser/update-parser.ts @@ -0,0 +1,41 @@ +import type { UpdateQueryBuilder } from '../query-builder/update-query-builder.js' +import type { UpdateResult } from '../query-builder/update-result.js' +import type { ShallowRecord } from '../util/type-utils.js' +import type { + ExtractTableAlias, + From, + FromTables, + TableExpressionOrList, +} from './table-parser.js' + +export type UpdateTable> = + TE extends ReadonlyArray + ? UpdateQueryBuilder< + From, + FromTables, + FromTables, + UpdateResult + > + : TE extends keyof DB & string + ? // This branch creates a good-looking type for the most common case: + // updateTable('person') --> UpdateQueryBuilder. + // ExtractTableAlias is needed for the case where DB == any. Without it: + // updateTable('person as p') --> UpdateQueryBuilder + UpdateQueryBuilder< + DB, + ExtractTableAlias, + ExtractTableAlias, + UpdateResult + > + : // This branch creates a good-looking type for common aliased case: + // updateTable('person as p') --> UpdateQueryBuilder. + TE extends `${infer T} as ${infer A}` + ? T extends keyof DB + ? UpdateQueryBuilder, A, A, UpdateResult> + : never + : UpdateQueryBuilder< + From, + FromTables, + FromTables, + UpdateResult + > diff --git a/src/parser/update-set-parser.ts b/src/parser/update-set-parser.ts index c3ce3fe4c..248491956 100644 --- a/src/parser/update-set-parser.ts +++ b/src/parser/update-set-parser.ts @@ -12,12 +12,19 @@ import { parseReferenceExpression, ReferenceExpression, } from './reference-parser.js' +import { AnyColumn, DrainOuterGeneric } from '../util/type-utils.js' -export type UpdateObject = { - [C in UpdateKeys]?: - | ValueExpression> - | undefined -} +export type UpdateObject< + DB, + TB extends keyof DB, + UT extends keyof DB = TB, +> = DrainOuterGeneric<{ + [C in AnyColumn]?: { + [T in UT]: C extends keyof DB[T] + ? ValueExpression> | undefined + : never + }[UT] +}> export type UpdateObjectFactory< DB, diff --git a/src/plugin/with-schema/with-schema-transformer.ts b/src/plugin/with-schema/with-schema-transformer.ts index af14b0b3d..3fd15a0e1 100644 --- a/src/plugin/with-schema/with-schema-transformer.ts +++ b/src/plugin/with-schema/with-schema-transformer.ts @@ -1,5 +1,6 @@ import { AliasNode } from '../../operation-node/alias-node.js' import { IdentifierNode } from '../../operation-node/identifier-node.js' +import { ListNode } from '../../operation-node/list-node.js' import { OperationNodeTransformer } from '../../operation-node/operation-node-transformer.js' import { OperationNode } from '../../operation-node/operation-node.js' import { ReferencesNode } from '../../operation-node/references-node.js' @@ -21,6 +22,7 @@ const ROOT_OPERATION_NODES: Record = freeze({ CreateTableNode: true, CreateTypeNode: true, CreateViewNode: true, + RefreshMaterializedViewNode: true, DeleteQueryNode: true, DropIndexNode: true, DropSchemaNode: true, @@ -157,14 +159,14 @@ export class WithSchemaTransformer extends OperationNodeTransformer { node: OperationNode, schemableIds: Set, ): void { - const table = TableNode.is(node) - ? node - : AliasNode.is(node) && TableNode.is(node.node) - ? node.node - : null - - if (table) { - this.#collectSchemableId(table.table, schemableIds) + if (TableNode.is(node)) { + this.#collectSchemableId(node.table, schemableIds) + } else if (AliasNode.is(node) && TableNode.is(node.node)) { + this.#collectSchemableId(node.node.table, schemableIds) + } else if (ListNode.is(node)) { + for (const table of node.items) { + this.#collectSchemableIdsFromTableExpr(table, schemableIds) + } } } diff --git a/src/query-builder/aggregate-function-builder.ts b/src/query-builder/aggregate-function-builder.ts index ebd559fbf..0b1f93095 100644 --- a/src/query-builder/aggregate-function-builder.ts +++ b/src/query-builder/aggregate-function-builder.ts @@ -2,7 +2,6 @@ import { freeze } from '../util/object-utils.js' import { AggregateFunctionNode } from '../operation-node/aggregate-function-node.js' import { AliasNode } from '../operation-node/alias-node.js' import { IdentifierNode } from '../operation-node/identifier-node.js' -import { preventAwait } from '../util/prevent-await.js' import { OverBuilder } from './over-builder.js' import { createOverBuilder } from '../parser/parse-utils.js' import { @@ -344,11 +343,6 @@ export class AggregateFunctionBuilder } } -preventAwait( - AggregateFunctionBuilder, - "don't await AggregateFunctionBuilder instances. They are never executed directly and are always just a part of a query.", -) - /** * {@link AggregateFunctionBuilder} with an alias. The result of calling {@link AggregateFunctionBuilder.as}. */ diff --git a/src/query-builder/cte-builder.ts b/src/query-builder/cte-builder.ts index b1d6013c3..7e0591640 100644 --- a/src/query-builder/cte-builder.ts +++ b/src/query-builder/cte-builder.ts @@ -1,6 +1,5 @@ import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CommonTableExpressionNode } from '../operation-node/common-table-expression-node.js' -import { preventAwait } from '../util/prevent-await.js' import { freeze } from '../util/object-utils.js' export class CTEBuilder implements OperationNodeSource { @@ -39,11 +38,6 @@ export class CTEBuilder implements OperationNodeSource { } } -preventAwait( - CTEBuilder, - "don't await CTEBuilder instances. They are never executed directly and are always just a part of a query.", -) - interface CTEBuilderProps { readonly node: CommonTableExpressionNode } diff --git a/src/query-builder/delete-query-builder.ts b/src/query-builder/delete-query-builder.ts index 0dde970a9..c71ba9f65 100644 --- a/src/query-builder/delete-query-builder.ts +++ b/src/query-builder/delete-query-builder.ts @@ -35,7 +35,6 @@ import { SimplifySingleResult, SqlBool, } from '../util/type-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { Compilable } from '../util/compilable.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' @@ -1153,11 +1152,6 @@ export class DeleteQueryBuilder } } -preventAwait( - DeleteQueryBuilder, - "don't await DeleteQueryBuilder instances directly. To execute the query you need to call `execute` or `executeTakeFirst`.", -) - export interface DeleteQueryBuilderProps { readonly queryId: QueryId readonly queryNode: DeleteQueryNode diff --git a/src/query-builder/insert-query-builder.ts b/src/query-builder/insert-query-builder.ts index 2dc2b1483..2d6b481c1 100644 --- a/src/query-builder/insert-query-builder.ts +++ b/src/query-builder/insert-query-builder.ts @@ -22,7 +22,6 @@ import { UpdateObjectExpression, parseUpdateObjectExpression, } from '../parser/update-set-parser.js' -import { preventAwait } from '../util/prevent-await.js' import { Compilable } from '../util/compilable.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' @@ -1187,11 +1186,6 @@ export class InsertQueryBuilder } } -preventAwait( - InsertQueryBuilder, - "don't await InsertQueryBuilder instances directly. To execute the query you need to call `execute` or `executeTakeFirst`.", -) - export interface InsertQueryBuilderProps { readonly queryId: QueryId readonly queryNode: InsertQueryNode diff --git a/src/query-builder/join-builder.ts b/src/query-builder/join-builder.ts index 9866faa67..da2163877 100644 --- a/src/query-builder/join-builder.ts +++ b/src/query-builder/join-builder.ts @@ -10,7 +10,6 @@ import { import { ExpressionOrFactory } from '../parser/expression-parser.js' import { ReferenceExpression } from '../parser/reference-parser.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { SqlBool } from '../util/type-utils.js' export class JoinBuilder @@ -92,11 +91,6 @@ export class JoinBuilder } } -preventAwait( - JoinBuilder, - "don't await JoinBuilder instances. They are never executed directly and are always just a part of a query.", -) - export interface JoinBuilderProps { readonly joinNode: JoinNode } diff --git a/src/query-builder/merge-query-builder.ts b/src/query-builder/merge-query-builder.ts index d7c8fe20e..e4ea17841 100644 --- a/src/query-builder/merge-query-builder.ts +++ b/src/query-builder/merge-query-builder.ts @@ -37,7 +37,6 @@ import { NOOP_QUERY_EXECUTOR } from '../query-executor/noop-query-executor.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { Compilable } from '../util/compilable.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryId } from '../util/query-id.js' import { ShallowRecord, @@ -263,11 +262,6 @@ export class MergeQueryBuilder } } -preventAwait( - MergeQueryBuilder, - "don't await MergeQueryBuilder instances directly. To execute the query you need to call `execute` when available.", -) - export interface MergeQueryBuilderProps { readonly queryId: QueryId readonly queryNode: MergeQueryNode @@ -840,11 +834,6 @@ export class WheneableMergeQueryBuilder< } } -preventAwait( - WheneableMergeQueryBuilder, - "don't await WheneableMergeQueryBuilder instances directly. To execute the query you need to call `execute`.", -) - export class MatchedThenableMergeQueryBuilder< DB, TT extends keyof DB, @@ -1041,11 +1030,6 @@ export class MatchedThenableMergeQueryBuilder< } } -preventAwait( - MatchedThenableMergeQueryBuilder, - "don't await MatchedThenableMergeQueryBuilder instances directly. To execute the query you need to call `execute` when available.", -) - export class NotMatchedThenableMergeQueryBuilder< DB, TT extends keyof DB, @@ -1152,11 +1136,6 @@ export class NotMatchedThenableMergeQueryBuilder< } } -preventAwait( - NotMatchedThenableMergeQueryBuilder, - "don't await NotMatchedThenableMergeQueryBuilder instances directly. To execute the query you need to call `execute` when available.", -) - export type ExtractWheneableMergeQueryBuilder< DB, TT extends keyof DB, diff --git a/src/query-builder/on-conflict-builder.ts b/src/query-builder/on-conflict-builder.ts index 6fce43e1c..fce275dc5 100644 --- a/src/query-builder/on-conflict-builder.ts +++ b/src/query-builder/on-conflict-builder.ts @@ -17,7 +17,6 @@ import { } from '../parser/update-set-parser.js' import { Updateable } from '../util/column-type.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { AnyColumn, SqlBool } from '../util/type-utils.js' import { WhereInterface } from './where-interface.js' @@ -276,8 +275,6 @@ export interface OnConflictBuilderProps { readonly onConflictNode: OnConflictNode } -preventAwait(OnConflictBuilder, "don't await OnConflictBuilder instances.") - export type OnConflictDatabase = { [K in keyof DB | 'excluded']: Updateable } @@ -298,11 +295,6 @@ export class OnConflictDoNothingBuilder } } -preventAwait( - OnConflictDoNothingBuilder, - "don't await OnConflictDoNothingBuilder instances.", -) - export class OnConflictUpdateBuilder implements WhereInterface, OperationNodeSource { @@ -383,8 +375,3 @@ export class OnConflictUpdateBuilder return this.#props.onConflictNode } } - -preventAwait( - OnConflictUpdateBuilder, - "don't await OnConflictUpdateBuilder instances.", -) diff --git a/src/query-builder/over-builder.ts b/src/query-builder/over-builder.ts index 330be843a..675f4950c 100644 --- a/src/query-builder/over-builder.ts +++ b/src/query-builder/over-builder.ts @@ -12,7 +12,6 @@ import { } from '../parser/partition-by-parser.js' import { StringReference } from '../parser/reference-parser.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' export class OverBuilder implements OperationNodeSource @@ -107,11 +106,6 @@ export class OverBuilder } } -preventAwait( - OverBuilder, - "don't await OverBuilder instances. They are never executed directly and are always just a part of a query.", -) - export interface OverBuilderProps { readonly overNode: OverNode } diff --git a/src/query-builder/select-query-builder.ts b/src/query-builder/select-query-builder.ts index da098a5ad..3fa5c9a6d 100644 --- a/src/query-builder/select-query-builder.ts +++ b/src/query-builder/select-query-builder.ts @@ -40,7 +40,6 @@ import { UndirectedOrderByExpression, parseOrderBy, } from '../parser/order-by-parser.js' -import { preventAwait } from '../util/prevent-await.js' import { LimitNode } from '../operation-node/limit-node.js' import { OffsetNode } from '../operation-node/offset-node.js' import { Compilable } from '../util/compilable.js' @@ -243,7 +242,7 @@ export interface SelectQueryBuilder * import { sql } from 'kysely' * * const persons = await db.selectFrom('person') - * .select(({ eb, selectFrom, or }) => [ + * .select(({ eb, selectFrom, or, val, lit }) => [ * // Select a correlated subquery * selectFrom('pet') * .whereRef('person.id', '=', 'pet.owner_id') @@ -260,7 +259,13 @@ export interface SelectQueryBuilder * ]).as('is_jennifer_or_arnold'), * * // Select a raw sql expression - * sql`concat(first_name, ' ', last_name)`.as('full_name') + * sql`concat(first_name, ' ', last_name)`.as('full_name'). + * + * // Select a static string value + * val('Some value').as('string_value'), + * + * // Select a literal value + * lit(42).as('literal_value'), * ]) * .execute() * ``` @@ -277,7 +282,9 @@ export interface SelectQueryBuilder * limit $1 * ) as "pet_name", * ("first_name" = $2 or "first_name" = $3) as "jennifer_or_arnold", - * concat(first_name, ' ', last_name) as "full_name" + * concat(first_name, ' ', last_name) as "full_name", + * $4 as "string_value", + * 42 as "literal_value" * from "person" * ``` * @@ -1928,6 +1935,54 @@ export interface SelectQueryBuilder ? ExpressionWrapper : KyselyTypeError<'$asTuple() call failed: All selected columns must be provided as arguments'> + /** + * Plucks the value type of the output record. + * + * In SQL, any record type that only has one column can be used as a scalar. + * For example a query like this works: + * + * ```sql + * select + * id, + * first_name + * from + * person as p + * where + * -- This is ok since the query only selects one row + * -- and one column. + * (select name from pet where pet.owner_id = p.id limit 1) = 'Doggo' + * ``` + * + * In many cases Kysely handles this automatically and picks the correct + * scalar type instead of the record type, but sometimes you need to give + * Kysely a hint. + * + * One such case are custom helper functions that take `Expression` + * instances as inputs: + * + * ```ts + * function doStuff(expr: Expression) { + * ... + * } + * + * // Error! This is not ok because the expression type is + * // `{ first_name: string }` instead of `string`. + * doStuff(db.selectFrom('person').select('first_name')) + * + * // Ok! This is ok since we've plucked the `string` type of the + * // only column in the output type. + * doStuff(db.selectFrom('person').select('first_name').$asScalar()) + * ``` + * + * This function has absolutely no effect on the generated SQL. It's + * purely a type-level helper. + * + * This method returns an `ExpressionWrapper` instead of a `SelectQueryBuilder` + * since the return value should only be used as a part of an expression + * and never executed as the main query. + */ + $asScalar(): ExpressionWrapper + /** * Narrows (parts of) the output type of the query. * @@ -2561,6 +2616,10 @@ class SelectQueryBuilderImpl return new ExpressionWrapper(this.toOperationNode()) } + $asScalar(): ExpressionWrapper { + return new ExpressionWrapper(this.toOperationNode()) + } + withPlugin(plugin: KyselyPlugin): SelectQueryBuilder { return new SelectQueryBuilderImpl({ ...this.#props, @@ -2647,11 +2706,6 @@ class SelectQueryBuilderImpl } } -preventAwait( - SelectQueryBuilderImpl, - "don't await SelectQueryBuilder instances directly. To execute the query you need to call `execute` or `executeTakeFirst`.", -) - export function createSelectQueryBuilder( props: SelectQueryBuilderProps, ): SelectQueryBuilder { @@ -2709,11 +2763,6 @@ class AliasedSelectQueryBuilderImpl< } } -preventAwait( - AliasedSelectQueryBuilderImpl, - "don't await AliasedSelectQueryBuilder instances directly. AliasedSelectQueryBuilder should never be executed directly since it's always a part of another query.", -) - export type SelectQueryBuilderWithInnerJoin< DB, TB extends keyof DB, diff --git a/src/query-builder/update-query-builder.ts b/src/query-builder/update-query-builder.ts index 6e3de86c2..a474a2eb9 100644 --- a/src/query-builder/update-query-builder.ts +++ b/src/query-builder/update-query-builder.ts @@ -41,7 +41,6 @@ import { ExtractUpdateTypeFromReferenceExpression, parseUpdate, } from '../parser/update-set-parser.js' -import { preventAwait } from '../util/prevent-await.js' import { Compilable } from '../util/compilable.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' @@ -523,8 +522,6 @@ export class UpdateQueryBuilder * }) * .where('id', '=', 1) * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) * ``` * * The generated SQL (PostgreSQL): @@ -548,8 +545,6 @@ export class UpdateQueryBuilder * })) * .where('id', '=', 1) * .executeTakeFirst() - * - * console.log(result.numUpdatedRows) * ``` * * The generated SQL (PostgreSQL): @@ -634,6 +629,43 @@ export class UpdateQueryBuilder * "last_name" = $3 || $4 * where "id" = $5 * ``` + * + * + * + * MySQL allows you to join tables directly to the "main" table and update + * rows of all joined tables. This is possible by passing all tables to the + * `updateTable` method as a list and adding the `ON` conditions as `WHERE` + * statements. You can then use the `set(column, value)` variant to update + * columns using table qualified names. + * + * The `UpdateQueryBuilder` also has `innerJoin` etc. join methods, but those + * can only be used as part of a PostgreSQL `update set from join` query. + * Due to type complexity issues, we unfortunately can't make the same + * methods work in both cases. + * + * ```ts + * const result = await db + * .updateTable(['person', 'pet']) + * .set('person.first_name', 'Updated person') + * .set('pet.name', 'Updated doggo') + * .whereRef('person.id', '=', 'pet.owner_id') + * .where('person.id', '=', '1') + * .executeTakeFirst() + * ``` + * + * The generated SQL (MySQL): + * + * ```sql + * update + * `person`, + * `pet` + * set + * `person`.`first_name` = ?, + * `pet`.`name` = ? + * where + * `person`.`id` = `pet`.`owner_id` + * and `person`.`id` = ? + * ``` */ set( update: UpdateObjectExpression, @@ -1158,11 +1190,6 @@ export class UpdateQueryBuilder } } -preventAwait( - UpdateQueryBuilder, - "don't await UpdateQueryBuilder instances directly. To execute the query you need to call `execute` or `executeTakeFirst`.", -) - export interface UpdateQueryBuilderProps { readonly queryId: QueryId readonly queryNode: UpdateQueryNode diff --git a/src/query-compiler/default-query-compiler.ts b/src/query-compiler/default-query-compiler.ts index 5c86395a0..bc124a5ae 100644 --- a/src/query-compiler/default-query-compiler.ts +++ b/src/query-compiler/default-query-compiler.ts @@ -111,6 +111,7 @@ import { CastNode } from '../operation-node/cast-node.js' import { FetchNode } from '../operation-node/fetch-node.js' import { TopNode } from '../operation-node/top-node.js' import { OutputNode } from '../operation-node/output-node.js' +import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js' export class DefaultQueryCompiler extends OperationNodeVisitor @@ -501,6 +502,8 @@ export class DefaultQueryCompiler protected override visitValue(node: ValueNode): void { if (node.immediate) { this.appendImmediateValue(node.value) + } else if (node.serialized) { + this.appendSerializedValue(node.value) } else { this.appendValue(node.value) } @@ -808,6 +811,12 @@ export class DefaultQueryCompiler } if (node.joins) { + if (!node.from) { + throw new Error( + "Joins in an update query are only supported as a part of a PostgreSQL 'update set from join' query. If you want to create a MySQL 'update join set' query, see https://kysely.dev/docs/examples/update/my-sql-joins", + ) + } + this.append(' ') this.compileList(node.joins, ' ') } @@ -1250,6 +1259,24 @@ export class DefaultQueryCompiler } } + protected override visitRefreshMaterializedView( + node: RefreshMaterializedViewNode, + ): void { + this.append('refresh materialized view ') + + if (node.concurrently) { + this.append('concurrently ') + } + + this.visitNode(node.name) + + if (node.withNoData) { + this.append(' with no data') + } else { + this.append(' with data') + } + } + protected override visitDropView(node: DropViewNode): void { this.append('drop ') @@ -1642,6 +1669,14 @@ export class DefaultQueryCompiler this.append(this.getCurrentParameterPlaceholder()) } + protected appendSerializedValue(parameter: unknown): void { + if (parameter === null) { + this.appendValue(null) + } else { + this.appendValue(JSON.stringify(parameter)) + } + } + protected getLeftIdentifierWrapper(): string { return '"' } diff --git a/src/query-compiler/query-compiler.ts b/src/query-compiler/query-compiler.ts index ec3ed9a63..8a14b7a81 100644 --- a/src/query-compiler/query-compiler.ts +++ b/src/query-compiler/query-compiler.ts @@ -12,6 +12,7 @@ import { DropViewNode } from '../operation-node/drop-view-node.js' import { MergeQueryNode } from '../operation-node/merge-query-node.js' import { QueryNode } from '../operation-node/query-node.js' import { RawNode } from '../operation-node/raw-node.js' +import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js' import { CompiledQuery } from './compiled-query.js' export type RootOperationNode = @@ -20,6 +21,7 @@ export type RootOperationNode = | CreateIndexNode | CreateSchemaNode | CreateViewNode + | RefreshMaterializedViewNode | DropTableNode | DropIndexNode | DropSchemaNode diff --git a/src/query-creator.ts b/src/query-creator.ts index 63df58180..1b403a715 100644 --- a/src/query-creator.ts +++ b/src/query-creator.ts @@ -11,17 +11,8 @@ import { SelectQueryNode } from './operation-node/select-query-node.js' import { UpdateQueryNode } from './operation-node/update-query-node.js' import { parseTable, - parseTableExpression, parseTableExpressionOrList, - TableExpression, - From, TableExpressionOrList, - FromTables, - TableReference, - TableReferenceOrList, - ExtractTableAlias, - AnyAliasedTable, - PickTableWithAlias, SimpleTableReference, parseAliasedTable, } from './parser/table-parser.js' @@ -52,6 +43,10 @@ import { import { MergeQueryBuilder } from './query-builder/merge-query-builder.js' import { MergeQueryNode } from './operation-node/merge-query-node.js' import { MergeResult } from './query-builder/merge-result.js' +import { SelectFrom } from './parser/select-from-parser.js' +import { DeleteFrom } from './parser/delete-from-parser.js' +import { UpdateTable } from './parser/update-parser.js' +import { MergeInto } from './parser/merge-into-parser.js' export class QueryCreator { readonly #props: QueryCreatorProps @@ -167,39 +162,17 @@ export class QueryCreator { * (select 1 as one) as "q" * ``` */ - selectFrom( - from: TE[], - ): SelectQueryBuilder, {}> - - selectFrom>( - from: TE[], - ): SelectQueryBuilder, FromTables, {}> - - selectFrom( - from: TE, - ): SelectQueryBuilder, {}> - - selectFrom>( - from: TE, - ): SelectQueryBuilder< - DB & PickTableWithAlias, - ExtractTableAlias, TE>, - {} - > - - selectFrom>( + selectFrom>( from: TE, - ): SelectQueryBuilder, FromTables, {}> - - selectFrom(from: TableExpressionOrList): any { + ): SelectFrom { return createSelectQueryBuilder({ queryId: createQueryId(), executor: this.#props.executor, queryNode: SelectQueryNode.createFrom( - parseTableExpressionOrList(from), + parseTableExpressionOrList(from as TableExpressionOrList), this.#props.withNode, ), - }) + }) as SelectFrom } /** @@ -413,31 +386,17 @@ export class QueryCreator { * where `person`.`id` = ? * ``` */ - deleteFrom( - from: TR[], - ): DeleteQueryBuilder, DeleteResult> - - deleteFrom>( - tables: TR[], - ): DeleteQueryBuilder, FromTables, DeleteResult> - - deleteFrom( - from: TR, - ): DeleteQueryBuilder, DeleteResult> - - deleteFrom>( - table: TR, - ): DeleteQueryBuilder, FromTables, DeleteResult> - - deleteFrom(tables: TableReferenceOrList): any { + deleteFrom>( + from: TE, + ): DeleteFrom { return new DeleteQueryBuilder({ queryId: createQueryId(), executor: this.#props.executor, queryNode: DeleteQueryNode.create( - parseTableExpressionOrList(tables), + parseTableExpressionOrList(from as TableExpressionOrList), this.#props.withNode, ), - }) + }) as DeleteFrom } /** @@ -463,42 +422,17 @@ export class QueryCreator { * console.log(result.numUpdatedRows) * ``` */ - updateTable( - table: TR, - ): UpdateQueryBuilder< - DB, - ExtractTableAlias, - ExtractTableAlias, - UpdateResult - > - - updateTable>( - table: TR, - ): UpdateQueryBuilder< - DB & PickTableWithAlias, - ExtractTableAlias, TR>, - ExtractTableAlias, TR>, - UpdateResult - > - - updateTable>( - table: TR, - ): UpdateQueryBuilder< - From, - FromTables, - FromTables, - UpdateResult - > - - updateTable>(table: TR): any { + updateTable>( + tables: TE, + ): UpdateTable { return new UpdateQueryBuilder({ queryId: createQueryId(), executor: this.#props.executor, queryNode: UpdateQueryNode.create( - parseTableExpression(table), + parseTableExpressionOrList(tables as TableExpressionOrList), this.#props.withNode, ), - }) + }) as UpdateTable } /** @@ -584,19 +518,9 @@ export class QueryCreator { * then delete * ``` */ - mergeInto( - targetTable: TR, - ): MergeQueryBuilder - - mergeInto>( + mergeInto>( targetTable: TR, - ): MergeQueryBuilder< - DB & PickTableWithAlias, - ExtractTableAlias, TR>, - MergeResult - > - - mergeInto>(targetTable: TR): any { + ): MergeInto { return new MergeQueryBuilder({ queryId: createQueryId(), executor: this.#props.executor, @@ -604,7 +528,7 @@ export class QueryCreator { parseAliasedTable(targetTable), this.#props.withNode, ), - }) + }) as MergeInto } /** diff --git a/src/query-executor/query-executor-base.ts b/src/query-executor/query-executor-base.ts index 8bc6d3db4..5aec6a5f4 100644 --- a/src/query-executor/query-executor-base.ts +++ b/src/query-executor/query-executor-base.ts @@ -12,6 +12,7 @@ import { DialectAdapter } from '../dialect/dialect-adapter.js' import { QueryExecutor } from './query-executor.js' import { Deferred } from '../util/deferred.js' import { logOnce } from '../util/log-once.js' +import { provideControlledConnection } from '../util/provide-controlled-connection.js' const NO_PLUGINS: ReadonlyArray = freeze([]) @@ -80,17 +81,7 @@ export abstract class QueryExecutorBase implements QueryExecutor { chunkSize: number, queryId: QueryId, ): AsyncIterableIterator> { - const connectionDefer = new Deferred() - const connectionReleaseDefer = new Deferred() - - this.provideConnection(async (connection) => { - connectionDefer.resolve(connection) - - // Lets wait until we don't need connection before returning here (returning releases connection) - return await connectionReleaseDefer.promise - }).catch((ex) => connectionDefer.reject(ex)) - - const connection = await connectionDefer.promise + const connection = await provideControlledConnection(this) try { for await (const result of connection.streamQuery( @@ -100,7 +91,7 @@ export abstract class QueryExecutorBase implements QueryExecutor { yield await this.#transformResult(result, queryId) } } finally { - connectionReleaseDefer.resolve() + connection.release() } } diff --git a/src/raw-builder/raw-builder.ts b/src/raw-builder/raw-builder.ts index 976fee89f..a683f09bc 100644 --- a/src/raw-builder/raw-builder.ts +++ b/src/raw-builder/raw-builder.ts @@ -2,7 +2,6 @@ import { QueryResult } from '../driver/database-connection.js' import { AliasNode } from '../operation-node/alias-node.js' import { RawNode } from '../operation-node/raw-node.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { freeze } from '../util/object-utils.js' import { KyselyPlugin } from '../plugin/kysely-plugin.js' @@ -230,11 +229,6 @@ export function createRawBuilder(props: RawBuilderProps): RawBuilder { return new RawBuilderImpl(props) } -preventAwait( - RawBuilderImpl, - "don't await RawBuilder instances directly. To execute the query you need to call `execute`", -) - /** * {@link RawBuilder} with an alias. The result of calling {@link RawBuilder.as}. */ @@ -275,8 +269,3 @@ class AliasedRawBuilderImpl ) } } - -preventAwait( - AliasedRawBuilderImpl, - "don't await AliasedRawBuilder instances directly. AliasedRawBuilder should never be executed directly since it's always a part of another query.", -) diff --git a/src/raw-builder/sql.ts b/src/raw-builder/sql.ts index 3320d4e1b..d5f910347 100644 --- a/src/raw-builder/sql.ts +++ b/src/raw-builder/sql.ts @@ -6,6 +6,7 @@ import { ValueNode } from '../operation-node/value-node.js' import { parseStringReference } from '../parser/reference-parser.js' import { parseTable } from '../parser/table-parser.js' import { parseValueExpression } from '../parser/value-parser.js' +import { Serialized } from '../util/column-type.js' import { createQueryId } from '../util/query-id.js' import { RawBuilder, createRawBuilder } from './raw-builder.js' @@ -137,6 +138,17 @@ export interface Sql { */ val(value: V): RawBuilder + /** + * `sql.valJson(value)` is a shortcut for: + * + * ```ts + * sql>`${serializerFn(obj)}` + * ``` + * + * Default serializer function is `JSON.stringify`. + */ + valJson(value: O): RawBuilder> + /** * @deprecated Use {@link Sql.val} instead. */ @@ -230,7 +242,7 @@ export interface Sql { * select first_name from "public"."person" * ``` */ - table(tableReference: string): RawBuilder + table(tableReference: string): RawBuilder /** * This can be used to add arbitrary identifiers to SQL snippets. @@ -273,7 +285,7 @@ export interface Sql { * select "public"."person"."first_name" from "public"."person" * ``` */ - id(...ids: readonly string[]): RawBuilder + id(...ids: readonly string[]): RawBuilder /** * This can be used to add literal values to SQL snippets. @@ -383,10 +395,10 @@ export interface Sql { * BEFORE $1::varchar, (1 == 1)::varchar, (select * from "person")::varchar, false::varchar, "first_name" AFTER * ``` */ - join( + join( array: readonly unknown[], separator?: RawBuilder, - ): RawBuilder + ): RawBuilder } export const sql: Sql = Object.assign( @@ -417,18 +429,27 @@ export const sql: Sql = Object.assign( }) }, + valJson(value: O): RawBuilder> { + return createRawBuilder({ + queryId: createQueryId(), + rawNode: RawNode.createWithChild( + ValueNode.create(value, { serialized: true }), + ), + }) + }, + value(value: V): RawBuilder { return this.val(value) }, - table(tableReference: string): RawBuilder { + table(tableReference: string): RawBuilder { return createRawBuilder({ queryId: createQueryId(), rawNode: RawNode.createWithChild(parseTable(tableReference)), }) }, - id(...ids: readonly string[]): RawBuilder { + id(...ids: readonly string[]): RawBuilder { const fragments = new Array(ids.length + 1).fill('.') fragments[0] = '' @@ -458,10 +479,10 @@ export const sql: Sql = Object.assign( }) }, - join( + join( array: readonly unknown[], separator: RawBuilder = sql`, `, - ): RawBuilder { + ): RawBuilder { const nodes = new Array(2 * array.length - 1) const sep = separator.toOperationNode() diff --git a/src/schema/alter-column-builder.ts b/src/schema/alter-column-builder.ts index b54398f4f..2b9347a8c 100644 --- a/src/schema/alter-column-builder.ts +++ b/src/schema/alter-column-builder.ts @@ -8,7 +8,6 @@ import { DefaultValueExpression, parseDefaultValueExpression, } from '../parser/default-value-parser.js' -import { preventAwait } from '../util/prevent-await.js' export class AlterColumnBuilder { readonly #column: string @@ -64,8 +63,6 @@ export class AlterColumnBuilder { } } -preventAwait(AlterColumnBuilder, "don't await AlterColumnBuilder instances") - /** * Allows us to force consumers to do exactly one alteration to a column. * @@ -110,5 +107,3 @@ export class AlteredColumnBuilder implements OperationNodeSource { export type AlterColumnBuilderCallback = ( builder: AlterColumnBuilder, ) => AlteredColumnBuilder - -preventAwait(AlteredColumnBuilder, "don't await AlteredColumnBuilder instances") diff --git a/src/schema/alter-table-add-foreign-key-constraint-builder.ts b/src/schema/alter-table-add-foreign-key-constraint-builder.ts index 4bdc3165d..046efa3af 100644 --- a/src/schema/alter-table-add-foreign-key-constraint-builder.ts +++ b/src/schema/alter-table-add-foreign-key-constraint-builder.ts @@ -6,7 +6,6 @@ import { CompiledQuery } from '../query-compiler/compiled-query.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { Compilable } from '../util/compilable.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryId } from '../util/query-id.js' import { ForeignKeyConstraintBuilder, @@ -80,8 +79,3 @@ export interface AlterTableAddForeignKeyConstraintBuilderProps { readonly node: AlterTableNode readonly constraintBuilder: ForeignKeyConstraintBuilder } - -preventAwait( - AlterTableAddForeignKeyConstraintBuilder, - "don't await AlterTableAddForeignKeyConstraintBuilder instances directly. To execute the query you need to call `execute`", -) diff --git a/src/schema/alter-table-add-index-builder.ts b/src/schema/alter-table-add-index-builder.ts index f7d3b4b7a..45b619572 100644 --- a/src/schema/alter-table-add-index-builder.ts +++ b/src/schema/alter-table-add-index-builder.ts @@ -12,7 +12,6 @@ import { CompiledQuery } from '../query-compiler/compiled-query.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { Compilable } from '../util/compilable.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryId } from '../util/query-id.js' export class AlterTableAddIndexBuilder @@ -224,8 +223,3 @@ export interface AlterTableAddIndexBuilderProps { readonly executor: QueryExecutor readonly node: AlterTableNode } - -preventAwait( - AlterTableAddIndexBuilder, - "don't await AlterTableAddIndexBuilder instances directly. To execute the query you need to call `execute`", -) diff --git a/src/schema/alter-table-builder.ts b/src/schema/alter-table-builder.ts index b7bee0308..034d144be 100644 --- a/src/schema/alter-table-builder.ts +++ b/src/schema/alter-table-builder.ts @@ -8,7 +8,6 @@ import { RenameColumnNode } from '../operation-node/rename-column-node.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' import { freeze, noop } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { ColumnDefinitionBuilder, ColumnDefinitionBuilderCallback, @@ -323,8 +322,6 @@ export interface AlterTableBuilderProps { readonly node: AlterTableNode } -preventAwait(AlterTableBuilder, "don't await AlterTableBuilder instances") - export interface ColumnAlteringInterface { alterColumn( column: string, @@ -470,8 +467,3 @@ export class AlterTableColumnAlteringBuilder export interface AlterTableColumnAlteringBuilderProps extends AlterTableBuilderProps {} - -preventAwait( - AlterTableColumnAlteringBuilder, - "don't await AlterTableColumnAlteringBuilder instances directly. To execute the query you need to call `execute`", -) diff --git a/src/schema/alter-table-drop-constraint-builder.ts b/src/schema/alter-table-drop-constraint-builder.ts index e6b4199be..4e3ec4117 100644 --- a/src/schema/alter-table-drop-constraint-builder.ts +++ b/src/schema/alter-table-drop-constraint-builder.ts @@ -5,7 +5,6 @@ import { CompiledQuery } from '../query-compiler/compiled-query.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { Compilable } from '../util/compilable.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryId } from '../util/query-id.js' export class AlterTableDropConstraintBuilder @@ -91,8 +90,3 @@ export interface AlterTableDropConstraintBuilderProps { readonly executor: QueryExecutor readonly node: AlterTableNode } - -preventAwait( - AlterTableDropConstraintBuilder, - "don't await AlterTableDropConstraintBuilder instances directly. To execute the query you need to call `execute`", -) diff --git a/src/schema/alter-table-executor.ts b/src/schema/alter-table-executor.ts index 08a172eb3..692d447c4 100644 --- a/src/schema/alter-table-executor.ts +++ b/src/schema/alter-table-executor.ts @@ -4,7 +4,6 @@ import { CompiledQuery } from '../query-compiler/compiled-query.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { Compilable } from '../util/compilable.js' import { freeze } from '../util/object-utils.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryId } from '../util/query-id.js' export class AlterTableExecutor implements OperationNodeSource, Compilable { @@ -38,8 +37,3 @@ export interface AlterTableExecutorProps { readonly executor: QueryExecutor readonly node: AlterTableNode } - -preventAwait( - AlterTableExecutor, - "don't await AlterTableExecutor instances directly. To execute the query you need to call `execute`", -) diff --git a/src/schema/column-definition-builder.ts b/src/schema/column-definition-builder.ts index 1935f00f4..4328d99fd 100644 --- a/src/schema/column-definition-builder.ts +++ b/src/schema/column-definition-builder.ts @@ -6,7 +6,6 @@ import { } from '../operation-node/references-node.js' import { SelectAllNode } from '../operation-node/select-all-node.js' import { parseStringReference } from '../parser/reference-parser.js' -import { preventAwait } from '../util/prevent-await.js' import { ColumnDefinitionNode } from '../operation-node/column-definition-node.js' import { DefaultValueExpression, @@ -686,11 +685,6 @@ export class ColumnDefinitionBuilder implements OperationNodeSource { } } -preventAwait( - ColumnDefinitionBuilder, - "don't await ColumnDefinitionBuilder instances directly.", -) - export type ColumnDefinitionBuilderCallback = ( builder: ColumnDefinitionBuilder, ) => ColumnDefinitionBuilder diff --git a/src/schema/create-index-builder.ts b/src/schema/create-index-builder.ts index c2f6eca30..28b215c6f 100644 --- a/src/schema/create-index-builder.ts +++ b/src/schema/create-index-builder.ts @@ -12,7 +12,6 @@ import { import { parseTable } from '../parser/table-parser.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -303,11 +302,6 @@ export class CreateIndexBuilder } } -preventAwait( - CreateIndexBuilder, - "don't await CreateIndexBuilder instances directly. To execute the query you need to call `execute`", -) - export interface CreateIndexBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/create-schema-builder.ts b/src/schema/create-schema-builder.ts index dd5d6998e..071cdcc35 100644 --- a/src/schema/create-schema-builder.ts +++ b/src/schema/create-schema-builder.ts @@ -2,7 +2,6 @@ import { CreateSchemaNode } from '../operation-node/create-schema-node.js' import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -48,11 +47,6 @@ export class CreateSchemaBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - CreateSchemaBuilder, - "don't await CreateSchemaBuilder instances directly. To execute the query you need to call `execute`", -) - export interface CreateSchemaBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/create-table-builder.ts b/src/schema/create-table-builder.ts index d83068c35..808b49aa2 100644 --- a/src/schema/create-table-builder.ts +++ b/src/schema/create-table-builder.ts @@ -6,7 +6,6 @@ import { import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { ColumnDefinitionBuilder } from './column-definition-builder.js' import { QueryId } from '../util/query-id.js' @@ -510,11 +509,6 @@ export class CreateTableBuilder } } -preventAwait( - CreateTableBuilder, - "don't await CreateTableBuilder instances directly. To execute the query you need to call `execute`", -) - export interface CreateTableBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/create-type-builder.ts b/src/schema/create-type-builder.ts index 78b9a3e6e..b9f079b4a 100644 --- a/src/schema/create-type-builder.ts +++ b/src/schema/create-type-builder.ts @@ -1,7 +1,6 @@ import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -57,11 +56,6 @@ export class CreateTypeBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - CreateTypeBuilder, - "don't await CreateTypeBuilder instances directly. To execute the query you need to call `execute`", -) - export interface CreateTypeBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/create-view-builder.ts b/src/schema/create-view-builder.ts index 50ff2e428..2542c09f6 100644 --- a/src/schema/create-view-builder.ts +++ b/src/schema/create-view-builder.ts @@ -1,7 +1,6 @@ import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -122,11 +121,6 @@ export class CreateViewBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - CreateViewBuilder, - "don't await CreateViewBuilder instances directly. To execute the query you need to call `execute`", -) - export interface CreateViewBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/drop-index-builder.ts b/src/schema/drop-index-builder.ts index 396b09ec9..4fabba208 100644 --- a/src/schema/drop-index-builder.ts +++ b/src/schema/drop-index-builder.ts @@ -2,7 +2,6 @@ import { DropIndexNode } from '../operation-node/drop-index-node.js' import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { parseTable } from '../parser/table-parser.js' @@ -73,11 +72,6 @@ export class DropIndexBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - DropIndexBuilder, - "don't await DropIndexBuilder instances directly. To execute the query you need to call `execute`", -) - export interface DropIndexBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/drop-schema-builder.ts b/src/schema/drop-schema-builder.ts index fc248e219..98001f0c6 100644 --- a/src/schema/drop-schema-builder.ts +++ b/src/schema/drop-schema-builder.ts @@ -2,7 +2,6 @@ import { DropSchemaNode } from '../operation-node/drop-schema-node.js' import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -59,11 +58,6 @@ export class DropSchemaBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - DropSchemaBuilder, - "don't await DropSchemaBuilder instances directly. To execute the query you need to call `execute`", -) - export interface DropSchemaBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/drop-table-builder.ts b/src/schema/drop-table-builder.ts index 120dece01..f5cf168e9 100644 --- a/src/schema/drop-table-builder.ts +++ b/src/schema/drop-table-builder.ts @@ -2,7 +2,6 @@ import { DropTableNode } from '../operation-node/drop-table-node.js' import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -59,11 +58,6 @@ export class DropTableBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - DropTableBuilder, - "don't await DropTableBuilder instances directly. To execute the query you need to call `execute`", -) - export interface DropTableBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/drop-type-builder.ts b/src/schema/drop-type-builder.ts index e783c37f6..c94662069 100644 --- a/src/schema/drop-type-builder.ts +++ b/src/schema/drop-type-builder.ts @@ -2,7 +2,6 @@ import { DropTypeNode } from '../operation-node/drop-type-node.js' import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -50,11 +49,6 @@ export class DropTypeBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - DropTypeBuilder, - "don't await DropTypeBuilder instances directly. To execute the query you need to call `execute`", -) - export interface DropTypeBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/drop-view-builder.ts b/src/schema/drop-view-builder.ts index 33634cad9..a7bd6e122 100644 --- a/src/schema/drop-view-builder.ts +++ b/src/schema/drop-view-builder.ts @@ -1,7 +1,6 @@ import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { CompiledQuery } from '../query-compiler/compiled-query.js' import { Compilable } from '../util/compilable.js' -import { preventAwait } from '../util/prevent-await.js' import { QueryExecutor } from '../query-executor/query-executor.js' import { QueryId } from '../util/query-id.js' import { freeze } from '../util/object-utils.js' @@ -68,11 +67,6 @@ export class DropViewBuilder implements OperationNodeSource, Compilable { } } -preventAwait( - DropViewBuilder, - "don't await DropViewBuilder instances directly. To execute the query you need to call `execute`", -) - export interface DropViewBuilderProps { readonly queryId: QueryId readonly executor: QueryExecutor diff --git a/src/schema/foreign-key-constraint-builder.ts b/src/schema/foreign-key-constraint-builder.ts index 5a7e45fa5..56990cacf 100644 --- a/src/schema/foreign-key-constraint-builder.ts +++ b/src/schema/foreign-key-constraint-builder.ts @@ -2,7 +2,6 @@ import { ForeignKeyConstraintNode } from '../operation-node/foreign-key-constrai import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { OnModifyForeignAction } from '../operation-node/references-node.js' import { parseOnModifyForeignAction } from '../parser/on-modify-action-parser.js' -import { preventAwait } from '../util/prevent-await.js' export interface ForeignKeyConstraintBuilderInterface { onDelete(onDelete: OnModifyForeignAction): R @@ -48,8 +47,3 @@ export class ForeignKeyConstraintBuilder return this.#node } } - -preventAwait( - ForeignKeyConstraintBuilder, - "don't await ForeignKeyConstraintBuilder instances directly.", -) diff --git a/src/schema/refresh-materialized-view-builder.ts b/src/schema/refresh-materialized-view-builder.ts new file mode 100644 index 000000000..75787f1a7 --- /dev/null +++ b/src/schema/refresh-materialized-view-builder.ts @@ -0,0 +1,99 @@ +import { OperationNodeSource } from '../operation-node/operation-node-source.js' +import { CompiledQuery } from '../query-compiler/compiled-query.js' +import { Compilable } from '../util/compilable.js' +import { QueryExecutor } from '../query-executor/query-executor.js' +import { QueryId } from '../util/query-id.js' +import { freeze } from '../util/object-utils.js' +import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js' + +export class RefreshMaterializedViewBuilder + implements OperationNodeSource, Compilable +{ + readonly #props: RefreshMaterializedViewBuilderProps + + constructor(props: RefreshMaterializedViewBuilderProps) { + this.#props = freeze(props) + } + + /** + * Adds the "concurrently" modifier. + * + * Use this to refresh the view without locking out concurrent selects on the materialized view. + * + * WARNING! + * This cannot be used with the "with no data" modifier. + */ + concurrently(): RefreshMaterializedViewBuilder { + return new RefreshMaterializedViewBuilder({ + ...this.#props, + node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { + concurrently: true, + withNoData: false, + }), + }) + } + + /** + * Adds the "with data" modifier. + * + * If specified (or defaults) the backing query is executed to provide the new data, and the materialized view is left in a scannable state + */ + withData(): RefreshMaterializedViewBuilder { + return new RefreshMaterializedViewBuilder({ + ...this.#props, + node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { + withNoData: false, + }), + }) + } + + /** + * Adds the "with no data" modifier. + * + * If specified, no new data is generated and the materialized view is left in an unscannable state. + * + * WARNING! + * This cannot be used with the "concurrently" modifier. + */ + withNoData(): RefreshMaterializedViewBuilder { + return new RefreshMaterializedViewBuilder({ + ...this.#props, + node: RefreshMaterializedViewNode.cloneWith(this.#props.node, { + withNoData: true, + concurrently: false, + }), + }) + } + + /** + * Simply calls the provided function passing `this` as the only argument. `$call` returns + * what the provided function returns. + */ + $call(func: (qb: this) => T): T { + return func(this) + } + + toOperationNode(): RefreshMaterializedViewNode { + return this.#props.executor.transformQuery( + this.#props.node, + this.#props.queryId, + ) + } + + compile(): CompiledQuery { + return this.#props.executor.compileQuery( + this.toOperationNode(), + this.#props.queryId, + ) + } + + async execute(): Promise { + await this.#props.executor.executeQuery(this.compile(), this.#props.queryId) + } +} + +export interface RefreshMaterializedViewBuilderProps { + readonly queryId: QueryId + readonly executor: QueryExecutor + readonly node: RefreshMaterializedViewNode +} diff --git a/src/schema/schema.ts b/src/schema/schema.ts index 555483fb8..07cbdeb4b 100644 --- a/src/schema/schema.ts +++ b/src/schema/schema.ts @@ -26,6 +26,8 @@ import { DropTypeBuilder } from './drop-type-builder.js' import { CreateTypeNode } from '../operation-node/create-type-node.js' import { DropTypeNode } from '../operation-node/drop-type-node.js' import { parseSchemableIdentifier } from '../parser/identifier-parser.js' +import { RefreshMaterializedViewBuilder } from './refresh-materialized-view-builder.js' +import { RefreshMaterializedViewNode } from '../operation-node/refresh-materialized-view-node.js' /** * Provides methods for building database schema. @@ -234,6 +236,26 @@ export class SchemaModule { }) } + /** + * Refresh a materialized view. + * + * ### Examples + * + * ```ts + * await db.schema + * .refreshMaterializedView('my_view') + * .concurrently() + * .execute() + * ``` + */ + refreshMaterializedView(viewName: string): RefreshMaterializedViewBuilder { + return new RefreshMaterializedViewBuilder({ + queryId: createQueryId(), + executor: this.#executor, + node: RefreshMaterializedViewNode.create(viewName), + }) + } + /** * Drop a view. * diff --git a/src/schema/unique-constraint-builder.ts b/src/schema/unique-constraint-builder.ts index 324263098..4e1e0bcb1 100644 --- a/src/schema/unique-constraint-builder.ts +++ b/src/schema/unique-constraint-builder.ts @@ -1,6 +1,5 @@ import { OperationNodeSource } from '../operation-node/operation-node-source.js' import { UniqueConstraintNode } from '../operation-node/unique-constraint-node.js' -import { preventAwait } from '../util/prevent-await.js' export class UniqueConstraintNodeBuilder implements OperationNodeSource { readonly #node: UniqueConstraintNode @@ -25,11 +24,6 @@ export class UniqueConstraintNodeBuilder implements OperationNodeSource { } } -preventAwait( - UniqueConstraintNodeBuilder, - "don't await UniqueConstraintNodeBuilder instances directly.", -) - export type UniqueConstraintNodeBuilderCallback = ( builder: UniqueConstraintNodeBuilder, ) => UniqueConstraintNodeBuilder diff --git a/src/util/column-type.ts b/src/util/column-type.ts index fc9daeb7d..2bade00c1 100644 --- a/src/util/column-type.ts +++ b/src/util/column-type.ts @@ -63,9 +63,37 @@ export type Generated = ColumnType */ export type GeneratedAlways = ColumnType +/** + * A shortcut for defining type-safe JSON columns. Inserts/updates require passing + * values that are wrapped with `eb.valJson` or `sql.valJson` instead of `JSON.stringify`. + */ +export type Json< + SelectType extends object | null, + InsertType extends Serialized | Extract = + | Serialized + | Extract, + UpdateType extends Serialized | Extract = + | Serialized + | Extract, +> = ColumnType + +/** + * A symbol that is used to brand serialized objects/arrays. + * @internal + */ +declare const SerializedBrand: unique symbol + +/** + * A type that is used to brand serialized objects/arrays. + */ +export type Serialized = O & { + readonly [SerializedBrand]: '⚠️ When you insert into or update columns of type `Json` (or similar), you should wrap your JSON value with `eb.valJson` or `sql.valJson`, instead of `JSON.stringify`. ⚠️' +} + /** * A shortcut for defining JSON columns, which are by default inserted/updated * as stringified JSON strings. + * @deprecated Use {@link Json} instead. */ export type JSONColumnType< SelectType extends object | null, diff --git a/src/util/infer-result.ts b/src/util/infer-result.ts index d972bbe9d..b616e3386 100644 --- a/src/util/infer-result.ts +++ b/src/util/infer-result.ts @@ -56,5 +56,5 @@ type ResolveResult = O extends | UpdateResult | DeleteResult | MergeResult - ? O + ? O[] : Simplify[] diff --git a/src/util/prevent-await.ts b/src/util/prevent-await.ts deleted file mode 100644 index 7a6089dda..000000000 --- a/src/util/prevent-await.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function preventAwait(clazz: Function, message: string): void { - Object.defineProperties(clazz.prototype, { - then: { - enumerable: false, - value: () => { - throw new Error(message) - }, - }, - }) -} diff --git a/src/util/provide-controlled-connection.ts b/src/util/provide-controlled-connection.ts new file mode 100644 index 000000000..127712d19 --- /dev/null +++ b/src/util/provide-controlled-connection.ts @@ -0,0 +1,27 @@ +import { ConnectionProvider } from '../driver/connection-provider.js' +import { DatabaseConnection } from '../driver/database-connection.js' +import { Deferred } from './deferred.js' + +export async function provideControlledConnection( + connectionProvider: ConnectionProvider, +): Promise { + const connectionDefer = new Deferred() + const connectionReleaseDefer = new Deferred() + + connectionProvider + .provideConnection(async (connection) => { + connectionDefer.resolve(connection) + + return await connectionReleaseDefer.promise + }) + .catch((ex) => connectionDefer.reject(ex)) + + const connection = (await connectionDefer.promise) as ControlledConnection + connection.release = connectionReleaseDefer.resolve + + return connection +} + +export interface ControlledConnection extends DatabaseConnection { + release(): void +} diff --git a/test/node/src/async-dispose.test.ts b/test/node/src/async-dispose.test.ts new file mode 100644 index 000000000..5fd922df9 --- /dev/null +++ b/test/node/src/async-dispose.test.ts @@ -0,0 +1,66 @@ +import { + CompiledQuery, + DatabaseConnection, + DummyDriver, + Kysely, + PostgresAdapter, + PostgresIntrospector, + PostgresQueryCompiler, + QueryResult, + RootOperationNode, + sql, +} from '../../..' +import { expect } from './test-setup' + +describe('async dispose', function () { + it('should call destroy ', async () => { + const steps: string[] = [] + + { + // @ts-ignore - `using` was only introduced in TS 5.2 + await using db = new Kysely({ + dialect: { + createAdapter: () => new PostgresAdapter(), + createDriver: () => + new (class extends DummyDriver { + async acquireConnection() { + return new (class implements DatabaseConnection { + async executeQuery(): Promise> { + steps.push('executed') + return { rows: [] } + } + streamQuery(): AsyncIterableIterator> { + throw new Error('Method not implemented.') + } + })() + } + async destroy(): Promise { + steps.push('destroyed') + } + })(), + createIntrospector: (db) => new PostgresIntrospector(db), + createQueryCompiler: () => + new (class extends PostgresQueryCompiler { + compileQuery(node: RootOperationNode): CompiledQuery { + const compiled = super.compileQuery(node) + steps.push('compiled') + return compiled + } + })(), + }, + }) + + await sql`select 1`.execute(db) + } + + steps.push('after runScope') + + expect(steps).to.length.to.be.greaterThan(1) + expect(steps).to.deep.equal([ + 'compiled', + 'executed', + 'destroyed', + 'after runScope', + ]) + }) +}) diff --git a/test/node/src/controlled-transaction.test.ts b/test/node/src/controlled-transaction.test.ts new file mode 100644 index 000000000..8ac61ea15 --- /dev/null +++ b/test/node/src/controlled-transaction.test.ts @@ -0,0 +1,629 @@ +import * as sinon from 'sinon' +import { Connection } from 'tedious' +import { + CompiledQuery, + ControlledTransaction, + Driver, + DummyDriver, + IsolationLevel, + Kysely, + SqliteDialect, +} from '../../../' +import { + DIALECTS, + Database, + TestContext, + clearDatabase, + destroyTest, + expect, + initTest, + insertDefaultDataSet, + limit, +} from './test-setup.js' + +for (const dialect of DIALECTS) { + describe(`${dialect}: controlled transaction`, () => { + let ctx: TestContext + const executedQueries: CompiledQuery[] = [] + const sandbox = sinon.createSandbox() + let tediousBeginTransactionSpy: sinon.SinonSpy< + Parameters, + ReturnType + > + let tediousCommitTransactionSpy: sinon.SinonSpy< + Parameters, + ReturnType + > + let tediousRollbackTransactionSpy: sinon.SinonSpy< + Parameters, + ReturnType + > + let tediousSaveTransactionSpy: sinon.SinonSpy< + Parameters, + ReturnType + > + + before(async function () { + ctx = await initTest(this, dialect, (event) => { + if (event.level === 'query') { + executedQueries.push(event.query) + } + }) + }) + + beforeEach(async () => { + await insertDefaultDataSet(ctx) + executedQueries.length = 0 + tediousBeginTransactionSpy = sandbox.spy( + Connection.prototype, + 'beginTransaction', + ) + tediousCommitTransactionSpy = sandbox.spy( + Connection.prototype, + 'commitTransaction', + ) + tediousRollbackTransactionSpy = sandbox.spy( + Connection.prototype, + 'rollbackTransaction', + ) + tediousSaveTransactionSpy = sandbox.spy( + Connection.prototype, + 'saveTransaction', + ) + }) + + afterEach(async () => { + await clearDatabase(ctx) + sandbox.restore() + }) + + after(async () => { + await destroyTest(ctx) + }) + + it('should be able to start and commit a transaction', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + await trx.commit().execute() + + if (dialect == 'postgres') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'commit', parameters: [] }, + ]) + } else if (dialect === 'mysql') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'commit', parameters: [] }, + ]) + } else if (dialect === 'mssql') { + expect(tediousBeginTransactionSpy.calledOnce).to.be.true + expect(tediousBeginTransactionSpy.getCall(0).args[1]).to.be.undefined + expect(tediousBeginTransactionSpy.getCall(0).args[2]).to.be.undefined + + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (@1, @2, @3)', + parameters: ['Foo', 'Barson', 'male'], + }, + ]) + + expect(tediousCommitTransactionSpy.calledOnce).to.be.true + } else { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'commit', parameters: [] }, + ]) + } + }) + + it('should be able to start and rollback a transaction', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + await trx.rollback().execute() + + if (dialect == 'postgres') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'rollback', parameters: [] }, + ]) + } else if (dialect === 'mysql') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'rollback', parameters: [] }, + ]) + } else if (dialect === 'mssql') { + expect(tediousBeginTransactionSpy.calledOnce).to.be.true + expect(tediousBeginTransactionSpy.getCall(0).args[1]).to.be.undefined + expect(tediousBeginTransactionSpy.getCall(0).args[2]).to.be.undefined + + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (@1, @2, @3)', + parameters: ['Foo', 'Barson', 'male'], + }, + ]) + + expect(tediousRollbackTransactionSpy.calledOnce).to.be.true + } else { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'begin', + parameters: [], + }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'rollback', parameters: [] }, + ]) + } + + const person = await ctx.db + .selectFrom('person') + .where('first_name', '=', 'Foo') + .select('first_name') + .executeTakeFirst() + + expect(person).to.be.undefined + }) + + if (dialect === 'postgres' || dialect === 'mysql' || dialect === 'mssql') { + for (const isolationLevel of [ + 'read uncommitted', + 'read committed', + 'repeatable read', + 'serializable', + ...(dialect === 'mssql' ? (['snapshot'] as const) : []), + ] as const) { + it(`should set the transaction isolation level as "${isolationLevel}"`, async () => { + const trx = await ctx.db + .startTransaction() + .setIsolationLevel(isolationLevel) + .execute() + + await trx + .insertInto('person') + .values({ + first_name: 'Foo', + last_name: 'Barson', + gender: 'male', + }) + .execute() + + await trx.commit().execute() + }) + } + } + + it('should be able to start a transaction with a single connection', async () => { + await ctx.db.connection().execute(async (conn) => { + const trx = await conn.startTransaction().execute() + + await insertSomething(trx) + + await trx.commit().execute() + + await insertSomethingElse(conn) + + const trx2 = await conn.startTransaction().execute() + + await insertSomething(trx2) + + await trx2.rollback().execute() + + await insertSomethingElse(conn) + }) + + const results = await ctx.db + .selectFrom('person') + .select('first_name') + .orderBy('id', 'desc') + .$call(limit(3, dialect)) + .execute() + expect(results).to.eql([ + { first_name: 'Fizz' }, + { first_name: 'Fizz' }, + { first_name: 'Foo' }, + ]) + }) + + it('should be able to savepoint and rollback to savepoint', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + const trxAfterFoo = await trx.savepoint('foo').execute() + + await insertSomethingElse(trxAfterFoo) + + await trxAfterFoo.rollbackToSavepoint('foo').execute() + + await trxAfterFoo.commit().execute() + + if (dialect == 'postgres') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint "foo"', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'rollback to "foo"', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } else if (dialect === 'mysql') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint `foo`', parameters: [] }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'rollback to `foo`', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } else if (dialect === 'mssql') { + expect(tediousBeginTransactionSpy.calledOnce).to.be.true + expect(tediousBeginTransactionSpy.getCall(0).args[1]).to.be.undefined + expect(tediousBeginTransactionSpy.getCall(0).args[2]).to.be.undefined + + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (@1, @2, @3)', + parameters: ['Foo', 'Barson', 'male'], + }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (@1, @2, @3)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + ]) + + expect(tediousSaveTransactionSpy.calledOnce).to.be.true + expect(tediousSaveTransactionSpy.getCall(0).args[1]).to.equal('foo') + + expect(tediousRollbackTransactionSpy.calledOnce).to.be.true + expect(tediousRollbackTransactionSpy.getCall(0).args[1]).to.equal('foo') + + expect(tediousCommitTransactionSpy.calledOnce).to.be.true + } else { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint "foo"', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'rollback to "foo"', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } + + const results = await ctx.db + .selectFrom('person') + .where('first_name', 'in', ['Foo', 'Fizz']) + .select('first_name') + .execute() + + expect(results).to.have.length(1) + expect(results[0].first_name).to.equal('Foo') + }) + + if (dialect === 'postgres' || dialect === 'mysql' || dialect === 'sqlite') { + it('should be able to savepoint and release savepoint', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + const trxAfterFoo = await trx.savepoint('foo').execute() + + await insertSomethingElse(trxAfterFoo) + + await trxAfterFoo.releaseSavepoint('foo').execute() + + await trxAfterFoo.commit().execute() + + if (dialect == 'postgres') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint "foo"', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values ($1, $2, $3)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'release "foo"', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } else if (dialect === 'mysql') { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint `foo`', parameters: [] }, + { + sql: 'insert into `person` (`first_name`, `last_name`, `gender`) values (?, ?, ?)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'release savepoint `foo`', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } else { + expect( + executedQueries.map((it) => ({ + sql: it.sql, + parameters: it.parameters, + })), + ).to.eql([ + { sql: 'begin', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Foo', 'Barson', 'male'], + }, + { sql: 'savepoint "foo"', parameters: [] }, + { + sql: 'insert into "person" ("first_name", "last_name", "gender") values (?, ?, ?)', + parameters: ['Fizz', 'Buzzson', 'female'], + }, + { sql: 'release "foo"', parameters: [] }, + { sql: 'commit', parameters: [] }, + ]) + } + + const results = await ctx.db + .selectFrom('person') + .where('first_name', 'in', ['Foo', 'Fizz']) + .select('first_name') + .orderBy('first_name') + .execute() + + expect(results).to.have.length(2) + expect(results[0].first_name).to.equal('Fizz') + expect(results[1].first_name).to.equal('Foo') + }) + } + + if (dialect === 'mssql') { + it('should throw an error when trying to release a savepoint as it is not supported', async () => { + const trx = await ctx.db.startTransaction().execute() + + await expect( + trx.releaseSavepoint('foo' as never).execute(), + ).to.be.rejectedWith( + 'The `releaseSavepoint` method is not supported by this driver', + ) + + await trx.rollback().execute() + }) + } + + it('should throw an error when trying to execute a query after the transaction has been committed', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + await trx.commit().execute() + + await expect(insertSomethingElse(trx)).to.be.rejectedWith( + 'Transaction is already committed', + ) + }) + + it('should throw an error when trying to execute a query after the transaction has been rolled back', async () => { + const trx = await ctx.db.startTransaction().execute() + + await insertSomething(trx) + + await trx.rollback().execute() + + await expect(insertSomethingElse(trx)).to.be.rejectedWith( + 'Transaction is already rolled back', + ) + }) + }) +} + +describe('custom dialect: controlled transaction', () => { + const db = new Kysely({ + dialect: new (class extends SqliteDialect { + createDriver(): Driver { + const driver = class extends DummyDriver {} + + // @ts-ignore + driver.prototype.releaseSavepoint = undefined + // @ts-ignore + driver.prototype.rollbackToSavepoint = undefined + // @ts-ignore + driver.prototype.savepoint = undefined + + return new driver() + } + // @ts-ignore + })({}), + }) + let trx: ControlledTransaction + + before(async () => { + trx = await db.startTransaction().execute() + }) + + after(async () => { + await trx.rollback().execute() + }) + + it('should throw an error when trying to savepoint on a dialect that does not support it', async () => { + const trx = await db.startTransaction().execute() + + await expect(trx.savepoint('foo').execute()).to.be.rejectedWith( + 'The `savepoint` method is not supported by this driver', + ) + }) + + it('should throw an error when trying to rollback to a savepoint on a dialect that does not support it', async () => { + const trx = await db.startTransaction().execute() + + await expect( + trx.rollbackToSavepoint('foo' as never).execute(), + ).to.be.rejectedWith( + 'The `rollbackToSavepoint` method is not supported by this driver', + ) + }) + + it('should throw an error when trying to release a savepoint on a dialect that does not support it', async () => { + const trx = await db.startTransaction().execute() + + await expect( + trx.releaseSavepoint('foo' as never).execute(), + ).to.be.rejectedWith( + 'The `releaseSavepoint` method is not supported by this driver', + ) + }) +}) + +async function insertSomething(db: Kysely) { + return await db + .insertInto('person') + .values({ + first_name: 'Foo', + last_name: 'Barson', + gender: 'male', + }) + .executeTakeFirstOrThrow() +} + +async function insertSomethingElse(db: Kysely) { + return await db + .insertInto('person') + .values({ + first_name: 'Fizz', + last_name: 'Buzzson', + gender: 'female', + }) + .executeTakeFirstOrThrow() +} diff --git a/test/node/src/json-traversal.test.ts b/test/node/src/json-traversal.test.ts index 363aeb33e..8ae957282 100644 --- a/test/node/src/json-traversal.test.ts +++ b/test/node/src/json-traversal.test.ts @@ -1,6 +1,6 @@ import { ColumnDefinitionBuilder, - JSONColumnType, + Json, ParseJSONResultsPlugin, SqlBool, sql, @@ -732,9 +732,9 @@ async function initJSONTest( let db = testContext.db.withTables<{ person_metadata: { person_id: number - website: JSONColumnType<{ url: string }> - nicknames: JSONColumnType - profile: JSONColumnType<{ + website: Json<{ url: string }> + nicknames: Json + profile: Json<{ auth: { roles: string[] last_login?: { device: string } @@ -744,12 +744,12 @@ async function initJSONTest( avatar: string | null tags: string[] }> - experience: JSONColumnType< + experience: Json< { establishment: string }[] > - schedule: JSONColumnType<{ name: string; time: string }[][][]> + schedule: Json<{ name: string; time: string }[][][]> } }>() @@ -798,20 +798,20 @@ async function insertDefaultJSONDataSet(ctx: TestContext) { await ctx.db .insertInto('person_metadata') - .values( + .values((eb) => people .filter((person) => person.first_name && person.last_name) .map((person, index) => ({ person_id: person.id, - website: JSON.stringify({ + website: eb.valJson({ url: `https://www.${person.first_name!.toLowerCase()}${person.last_name!.toLowerCase()}.com`, }), - nicknames: JSON.stringify([ + nicknames: eb.valJson([ `${person.first_name![0]}.${person.last_name![0]}.`, `${person.first_name} the Great`, `${person.last_name} the Magnificent`, ]), - profile: JSON.stringify({ + profile: eb.valJson({ tags: ['awesome'], auth: { roles: ['contributor', 'moderator'], @@ -823,12 +823,12 @@ async function insertDefaultJSONDataSet(ctx: TestContext) { }, avatar: null, }), - experience: JSON.stringify([ + experience: eb.valJson([ { establishment: 'The University of Life', }, ]), - schedule: JSON.stringify([[[{ name: 'Gym', time: '12:15' }]]]), + schedule: sql.valJson([[[{ name: 'Gym', time: '12:15' }]]]), })), ) .execute() diff --git a/test/node/src/schema.test.ts b/test/node/src/schema.test.ts index 624b77267..850f199de 100644 --- a/test/node/src/schema.test.ts +++ b/test/node/src/schema.test.ts @@ -1949,6 +1949,87 @@ for (const dialect of DIALECTS) { } }) + describe('refresh materialized view', () => { + beforeEach(async () => { + await ctx.db.schema + .createView('materialized_dogs') + .materialized() + .as(ctx.db.selectFrom('pet').selectAll().where('species', '=', 'dog')) + .execute() + }) + + afterEach(async () => { + await ctx.db.schema + .dropView('materialized_dogs') + .materialized() + .ifExists() + .execute() + }) + + if (dialect === 'postgres') { + it('should refresh a materialized view', async () => { + const builder = + ctx.db.schema.refreshMaterializedView('materialized_dogs') + + testSql(builder, dialect, { + postgres: { + sql: `refresh materialized view "materialized_dogs" with data`, + parameters: [], + }, + mssql: NOT_SUPPORTED, + mysql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await builder.execute() + }) + + it('should refresh a materialized view concurrently', async () => { + // concurrent refreshes require a unique index + await ctx.db.schema + .createIndex('materialized_dogs_index') + .unique() + .on('materialized_dogs') + .columns(['id']) + .execute() + + const builder = ctx.db.schema + .refreshMaterializedView('materialized_dogs') + .concurrently() + + testSql(builder, dialect, { + postgres: { + sql: `refresh materialized view concurrently "materialized_dogs" with data`, + parameters: [], + }, + mssql: NOT_SUPPORTED, + mysql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await builder.execute() + }) + + it('should refresh a materialized view with no data', async () => { + const builder = ctx.db.schema + .refreshMaterializedView('materialized_dogs') + .withNoData() + + testSql(builder, dialect, { + postgres: { + sql: `refresh materialized view "materialized_dogs" with no data`, + parameters: [], + }, + mssql: NOT_SUPPORTED, + mysql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await builder.execute() + }) + } + }) + describe('drop view', () => { beforeEach(async () => { await ctx.db.schema diff --git a/test/node/src/update.test.ts b/test/node/src/update.test.ts index b4afdc650..adcc8849e 100644 --- a/test/node/src/update.test.ts +++ b/test/node/src/update.test.ts @@ -577,6 +577,123 @@ for (const dialect of DIALECTS) { expect(people).to.have.length(2) }) + + it('should update joined table using set(column, value) function', async () => { + const query = ctx.db + .updateTable(['person', 'pet']) + .set('person.first_name', 'Jennifer 2') + .set('pet.name', 'Doggo 2') + .where('person.first_name', '=', 'Jennifer') + .whereRef('person.id', '=', 'pet.owner_id') + + testSql(query, dialect, { + postgres: NOT_SUPPORTED, + mysql: { + sql: 'update `person`, `pet` set `person`.`first_name` = ?, `pet`.`name` = ? where `person`.`first_name` = ? and `person`.`id` = `pet`.`owner_id`', + parameters: ['Jennifer 2', 'Doggo 2', 'Jennifer'], + }, + mssql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await query.execute() + + const jennifer = await ctx.db + .selectFrom('person') + .select(['id', 'first_name']) + .where('first_name', '=', 'Jennifer 2') + .execute() + + const doggo = await ctx.db + .selectFrom('pet') + .select(['name', 'owner_id']) + .where('name', '=', 'Doggo 2') + .execute() + + expect(jennifer).to.have.length(1) + expect(doggo).to.have.length(1) + expect(doggo[0].owner_id).to.equal(jennifer[0].id) + }) + + it('should update joined aliased table using set(column, value) function and', async () => { + const query = ctx.db + .updateTable(['person as per', 'pet as p']) + .set('per.first_name', 'Jennifer 2') + .set('p.name', 'Doggo 2') + .where('per.first_name', '=', 'Jennifer') + .whereRef('per.id', '=', 'p.owner_id') + + testSql(query, dialect, { + postgres: NOT_SUPPORTED, + mysql: { + sql: 'update `person` as `per`, `pet` as `p` set `per`.`first_name` = ?, `p`.`name` = ? where `per`.`first_name` = ? and `per`.`id` = `p`.`owner_id`', + parameters: ['Jennifer 2', 'Doggo 2', 'Jennifer'], + }, + mssql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await query.execute() + + const jennifer = await ctx.db + .selectFrom('person') + .select(['id', 'first_name']) + .where('first_name', '=', 'Jennifer 2') + .execute() + + const doggo = await ctx.db + .selectFrom('pet') + .select(['name', 'owner_id']) + .where('name', '=', 'Doggo 2') + .execute() + + expect(jennifer).to.have.length(1) + expect(doggo).to.have.length(1) + expect(doggo[0].owner_id).to.equal(jennifer[0].id) + }) + + it('should join expressions', async () => { + const query = ctx.db + .updateTable([ + 'person', + ctx.db.selectFrom('pet').selectAll().as('pet'), + ]) + .set('person.first_name', 'Jennifer 2') + .where('person.first_name', '=', 'Jennifer') + .whereRef('person.id', '=', 'pet.owner_id') + + testSql(query, dialect, { + postgres: NOT_SUPPORTED, + mysql: { + sql: 'update `person`, (select * from `pet`) as `pet` set `person`.`first_name` = ? where `person`.`first_name` = ? and `person`.`id` = `pet`.`owner_id`', + parameters: ['Jennifer 2', 'Jennifer'], + }, + mssql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await query.execute() + }) + + it('should update joined table using set(object) function', async () => { + const query = ctx.db + .updateTable(['person', 'pet']) + .set({ name: 'Doggo 2' }) + .where('person.first_name', '=', 'Jennifer') + .whereRef('person.id', '=', 'pet.owner_id') + + testSql(query, dialect, { + postgres: NOT_SUPPORTED, + mysql: { + sql: 'update `person`, `pet` set `name` = ? where `person`.`first_name` = ? and `person`.`id` = `pet`.`owner_id`', + parameters: ['Doggo 2', 'Jennifer'], + }, + mssql: NOT_SUPPORTED, + sqlite: NOT_SUPPORTED, + }) + + await query.execute() + }) } it('should create an update query that uses a CTE', async () => { diff --git a/test/node/tsconfig.json b/test/node/tsconfig.json index 83e6196bb..314b0282c 100644 --- a/test/node/tsconfig.json +++ b/test/node/tsconfig.json @@ -1,9 +1 @@ -{ - "extends": "../../tsconfig-base.json", - "include": ["src/**/*"], - "compilerOptions": { - "module": "CommonJS", - "outDir": "dist", - "skipLibCheck": true - } -} +{"compilerOptions":{"target":"ES2022","lib":["ESNext"],"module":"CommonJS","outDir":"dist","skipLibCheck":true},"default":{"compilerOptions":{"target":"ES2022","lib":["ESNext"],"module":"CommonJS","outDir":"dist","skipLibCheck":true},"default":{"compilerOptions":{"target":"ES2022","lib":["ESNext"],"module":"CommonJS","outDir":"dist","skipLibCheck":true},"default":{"extends":"../../tsconfig-base.json","include":["src/**/*"],"compilerOptions":{"target":"ES2022","lib":["ESNext"],"module":"CommonJS","outDir":"dist","skipLibCheck":true}},"extends":"../../tsconfig-base.json","include":["src/**/*"],"exclude":["src/async-dispose.test.ts"]},"exclude":["src/async-dispose.test.ts"],"extends":"../../tsconfig-base.json","include":["src/**/*"]},"exclude":["src/async-dispose.test.ts","src/async-dispose.test.ts"],"extends":"../../tsconfig-base.json","include":["src/**/*"]} \ No newline at end of file diff --git a/test/outdated-ts/outdated-ts.test.ts b/test/outdated-ts/outdated-ts.test.ts new file mode 100644 index 000000000..9d6072cd3 --- /dev/null +++ b/test/outdated-ts/outdated-ts.test.ts @@ -0,0 +1,10 @@ +import { Kysely, RawBuilder, sql } from 'kysely' +import { KyselyTypeError } from '../../src/util/type-error' + +function expectOutdatedTSError( + _: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'>, +): void {} + +expectOutdatedTSError(Kysely) +expectOutdatedTSError(RawBuilder) +expectOutdatedTSError(sql) diff --git a/test/outdated-ts/package-lock.json b/test/outdated-ts/package-lock.json new file mode 100644 index 000000000..02dcaf22f --- /dev/null +++ b/test/outdated-ts/package-lock.json @@ -0,0 +1,4048 @@ +{ + "name": "outdated-ts", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "outdated-ts", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "kysely": "file:../../" + }, + "devDependencies": { + "typescript": "4.5.x" + } + }, + "../..": { + "version": "0.27.4", + "license": "MIT", + "devDependencies": { + "@arethetypeswrong/cli": "^0.16.4", + "@types/better-sqlite3": "^7.6.11", + "@types/chai": "^4.3.17", + "@types/chai-as-promised": "^7.1.8", + "@types/chai-subset": "^1.3.5", + "@types/mocha": "^10.0.7", + "@types/node": "^22.5.0", + "@types/pg": "^8.11.6", + "@types/pg-cursor": "^2.7.2", + "@types/semver": "^7.5.8", + "@types/sinon": "^17.0.2", + "@types/tedious": "^4.0.9", + "better-sqlite3": "^11.2.1", + "chai": "^4.5.0", + "chai-as-promised": "^7.1.2", + "chai-subset": "^1.6.0", + "esbuild": "^0.23.1", + "lodash": "^4.17.21", + "mocha": "^10.7.3", + "mysql2": "^3.11.0", + "pathe": "^1.1.2", + "pg": "^8.12.0", + "pg-cursor": "^2.11.0", + "playwright": "^1.46.1", + "prettier": "^3.3.3", + "semver": "^7.6.3", + "sinon": "^18.0.0", + "tarn": "^3.0.2", + "tedious": "^19.0.0", + "tsd": "^0.31.1", + "tsx": "^4.19.1", + "typescript": "^5.6.3" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@andrewbranch/untar.js": { + "version": "1.0.3", + "dev": true + }, + "../../node_modules/@arethetypeswrong/cli": { + "version": "0.16.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@arethetypeswrong/core": "0.16.4", + "chalk": "^4.1.2", + "cli-table3": "^0.6.3", + "commander": "^10.0.1", + "marked": "^9.1.2", + "marked-terminal": "^7.1.0", + "semver": "^7.5.4" + }, + "bin": { + "attw": "dist/index.js" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/@arethetypeswrong/core": { + "version": "0.16.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@andrewbranch/untar.js": "^1.0.3", + "cjs-module-lexer": "^1.2.3", + "fflate": "^0.8.2", + "lru-cache": "^10.4.3", + "semver": "^7.5.4", + "typescript": "5.6.1-rc", + "validate-npm-package-name": "^5.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/@arethetypeswrong/core/node_modules/lru-cache": { + "version": "10.4.3", + "dev": true, + "license": "ISC" + }, + "../../node_modules/@arethetypeswrong/core/node_modules/typescript": { + "version": "5.6.1-rc", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "../../node_modules/@azure/abort-controller": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "../../node_modules/@azure/core-auth": { + "version": "1.7.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-util": "^1.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-auth/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-client": { + "version": "1.9.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.4.0", + "@azure/core-rest-pipeline": "^1.9.1", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.6.1", + "@azure/logger": "^1.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-client/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-http-compat": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^1.0.4", + "@azure/core-client": "^1.3.0", + "@azure/core-rest-pipeline": "^1.3.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "../../node_modules/@azure/core-lro": { + "version": "2.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-util": "^1.2.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-lro/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-paging": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "../../node_modules/@azure/core-rest-pipeline": { + "version": "1.14.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.4.0", + "@azure/core-tracing": "^1.0.1", + "@azure/core-util": "^1.3.0", + "@azure/logger": "^1.0.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-rest-pipeline/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-tracing": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "../../node_modules/@azure/core-util": { + "version": "1.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/core-util/node_modules/@azure/abort-controller": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/identity": { + "version": "4.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.5.0", + "@azure/core-client": "^1.9.2", + "@azure/core-rest-pipeline": "^1.1.0", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.3.0", + "@azure/logger": "^1.0.0", + "@azure/msal-browser": "^3.14.0", + "@azure/msal-node": "^2.9.2", + "events": "^3.0.0", + "jws": "^4.0.0", + "open": "^8.0.0", + "stoppable": "^1.1.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/keyvault-keys": { + "version": "4.8.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^1.0.0", + "@azure/core-auth": "^1.3.0", + "@azure/core-client": "^1.5.0", + "@azure/core-http-compat": "^2.0.1", + "@azure/core-lro": "^2.2.0", + "@azure/core-paging": "^1.1.1", + "@azure/core-rest-pipeline": "^1.8.1", + "@azure/core-tracing": "^1.0.0", + "@azure/core-util": "^1.0.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "../../node_modules/@azure/logger": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.2.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "../../node_modules/@azure/msal-browser": { + "version": "3.21.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/msal-common": "14.14.1" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@azure/msal-common": { + "version": "14.14.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@azure/msal-node": { + "version": "2.13.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/msal-common": "14.14.1", + "jsonwebtoken": "^9.0.0", + "uuid": "^8.3.0" + }, + "engines": { + "node": ">=16" + } + }, + "../../node_modules/@babel/code-frame": { + "version": "7.23.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight": { + "version": "7.23.4", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "../../node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "../../node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/@colors/colors": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=0.1.90" + } + }, + "../../node_modules/@esbuild/linux-x64": { + "version": "0.23.1", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "../../node_modules/@jest/schemas": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/@js-joda/core": { + "version": "5.6.1", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/@sinclair/typebox": { + "version": "0.27.8", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@sindresorhus/is": { + "version": "4.6.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "../../node_modules/@sinonjs/commons": { + "version": "3.0.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "../../node_modules/@sinonjs/fake-timers": { + "version": "11.3.1", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "../../node_modules/@sinonjs/samsam": { + "version": "8.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^2.0.0", + "lodash.get": "^4.4.2", + "type-detect": "^4.0.8" + } + }, + "../../node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "../../node_modules/@sinonjs/text-encoding": { + "version": "0.7.3", + "dev": true, + "license": "(Unlicense OR Apache-2.0)" + }, + "../../node_modules/@tootallnate/once": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "../../node_modules/@tsd/typescript": { + "version": "5.4.5", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.17" + } + }, + "../../node_modules/@types/better-sqlite3": { + "version": "7.6.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/@types/chai": { + "version": "4.3.17", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/chai-as-promised": { + "version": "7.1.8", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } + }, + "../../node_modules/@types/chai-subset": { + "version": "1.3.5", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "*" + } + }, + "../../node_modules/@types/eslint": { + "version": "7.29.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "../../node_modules/@types/estree": { + "version": "1.0.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/minimist": { + "version": "1.2.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/mocha": { + "version": "10.0.7", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/node": { + "version": "22.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "../../node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/pg": { + "version": "8.11.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "pg-protocol": "*", + "pg-types": "^4.0.1" + } + }, + "../../node_modules/@types/pg-cursor": { + "version": "2.7.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/pg": "*" + } + }, + "../../node_modules/@types/readable-stream": { + "version": "4.0.10", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "safe-buffer": "~5.1.1" + } + }, + "../../node_modules/@types/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/semver": { + "version": "7.5.8", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/sinon": { + "version": "17.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/sinonjs__fake-timers": "*" + } + }, + "../../node_modules/@types/sinonjs__fake-timers": { + "version": "8.1.5", + "dev": true, + "license": "MIT" + }, + "../../node_modules/@types/tedious": { + "version": "4.0.14", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "../../node_modules/abort-controller": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "../../node_modules/agent-base": { + "version": "6.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "../../node_modules/ansi-colors": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/any-promise": { + "version": "1.3.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/anymatch": { + "version": "3.1.3", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" + }, + "../../node_modules/array-union": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/arrify": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/assertion-error": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "../../node_modules/aws-ssl-profiles": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, + "../../node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/base64-js": { + "version": "1.5.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/better-sqlite3": { + "version": "11.2.1", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + } + }, + "../../node_modules/binary-extensions": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/bindings": { + "version": "1.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "../../node_modules/bl": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "../../node_modules/brace-expansion": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "../../node_modules/braces": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/browser-stdout": { + "version": "1.3.1", + "dev": true, + "license": "ISC" + }, + "../../node_modules/buffer": { + "version": "5.7.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "../../node_modules/buffer-equal-constant-time": { + "version": "1.0.1", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/camelcase": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/camelcase-keys": { + "version": "6.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/chai": { + "version": "4.5.0", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/chai-as-promised": { + "version": "7.1.2", + "dev": true, + "license": "WTFPL", + "dependencies": { + "check-error": "^1.0.2" + }, + "peerDependencies": { + "chai": ">= 2.1.2 < 6" + } + }, + "../../node_modules/chai-subset": { + "version": "1.6.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/chai/node_modules/type-detect": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/char-regex": { + "version": "1.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/check-error": { + "version": "1.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, + "../../node_modules/chokidar": { + "version": "3.5.3", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "../../node_modules/chownr": { + "version": "1.1.4", + "dev": true, + "license": "ISC" + }, + "../../node_modules/cjs-module-lexer": { + "version": "1.4.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/cli-highlight": { + "version": "2.1.11", + "dev": true, + "license": "ISC", + "dependencies": { + "chalk": "^4.0.0", + "highlight.js": "^10.7.1", + "mz": "^2.4.0", + "parse5": "^5.1.1", + "parse5-htmlparser2-tree-adapter": "^6.0.0", + "yargs": "^16.0.0" + }, + "bin": { + "highlight": "bin/highlight" + }, + "engines": { + "node": ">=8.0.0", + "npm": ">=5.0.0" + } + }, + "../../node_modules/cli-table3": { + "version": "0.6.5", + "dev": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.2.0" + }, + "engines": { + "node": "10.* || >= 12.*" + }, + "optionalDependencies": { + "@colors/colors": "1.5.0" + } + }, + "../../node_modules/cliui": { + "version": "7.0.4", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "../../node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "../../node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/commander": { + "version": "10.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "../../node_modules/debug": { + "version": "4.3.6", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "../../node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/decamelize": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/decamelize-keys": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/decompress-response": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/deep-eql": { + "version": "4.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/deep-extend": { + "version": "0.6.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "../../node_modules/define-lazy-prop": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/denque": { + "version": "2.1.0", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=0.10" + } + }, + "../../node_modules/detect-libc": { + "version": "2.0.2", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/diff": { + "version": "5.2.0", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "../../node_modules/diff-sequences": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/dir-glob": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/ecdsa-sig-formatter": { + "version": "1.0.11", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + } + }, + "../../node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/emojilib": { + "version": "2.4.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/end-of-stream": { + "version": "1.4.4", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "../../node_modules/environment": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/error-ex": { + "version": "1.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "../../node_modules/esbuild": { + "version": "0.23.1", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" + } + }, + "../../node_modules/escalade": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/escape-string-regexp": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/eslint-formatter-pretty": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "^7.2.13", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/eslint-rule-docs": { + "version": "1.1.235", + "dev": true, + "license": "MIT" + }, + "../../node_modules/event-target-shim": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/events": { + "version": "3.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "../../node_modules/expand-template": { + "version": "2.0.3", + "dev": true, + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/fast-glob": { + "version": "3.3.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "../../node_modules/fastq": { + "version": "1.17.1", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "../../node_modules/fflate": { + "version": "0.8.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/file-uri-to-path": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fill-range": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/find-up": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/flat": { + "version": "5.0.2", + "dev": true, + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "../../node_modules/fs-constants": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/function-bind": { + "version": "1.1.2", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/generate-function": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-property": "^1.0.2" + } + }, + "../../node_modules/get-caller-file": { + "version": "2.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "../../node_modules/get-func-name": { + "version": "2.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "../../node_modules/get-tsconfig": { + "version": "4.8.1", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "../../node_modules/github-from-package": { + "version": "0.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/glob": { + "version": "8.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "../../node_modules/glob-parent": { + "version": "5.1.2", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/globby": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/hard-rejection": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/hasown": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "../../node_modules/he": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "bin": { + "he": "bin/he" + } + }, + "../../node_modules/highlight.js": { + "version": "10.7.3", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "../../node_modules/hosted-git-info": { + "version": "4.1.0", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/hosted-git-info/node_modules/lru-cache": { + "version": "6.0.0", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/http-proxy-agent": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/https-proxy-agent": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/iconv-lite": { + "version": "0.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/ieee754": { + "version": "1.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "../../node_modules/ignore": { + "version": "5.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "../../node_modules/indent-string": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "../../node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "license": "ISC" + }, + "../../node_modules/ini": { + "version": "1.3.8", + "dev": true, + "license": "ISC" + }, + "../../node_modules/irregular-plurals": { + "version": "3.5.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-arrayish": { + "version": "0.2.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/is-binary-path": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-core-module": { + "version": "2.13.1", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/is-docker": { + "version": "2.2.1", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-extglob": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/is-glob": { + "version": "4.0.3", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-number": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "../../node_modules/is-plain-obj": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/is-property": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/is-unicode-supported": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/is-wsl": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/jest-diff": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/jest-get-type": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/js-md4": { + "version": "0.3.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/js-yaml": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "../../node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/jsonwebtoken": { + "version": "9.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + } + }, + "../../node_modules/jsonwebtoken/node_modules/jwa": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "../../node_modules/jsonwebtoken/node_modules/jws": { + "version": "3.2.2", + "dev": true, + "license": "MIT", + "dependencies": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "../../node_modules/just-extend": { + "version": "6.2.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/jwa": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "../../node_modules/jws": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "../../node_modules/kind-of": { + "version": "6.0.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/lines-and-columns": { + "version": "1.2.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/locate-path": { + "version": "6.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.get": { + "version": "4.4.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.includes": { + "version": "4.3.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.isboolean": { + "version": "3.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.isinteger": { + "version": "4.0.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.isnumber": { + "version": "3.0.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.isplainobject": { + "version": "4.0.6", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.isstring": { + "version": "4.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/lodash.once": { + "version": "4.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/log-symbols": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/long": { + "version": "5.2.3", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/loupe": { + "version": "2.3.7", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, + "../../node_modules/lru-cache": { + "version": "8.0.5", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16.14" + } + }, + "../../node_modules/map-obj": { + "version": "4.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/marked": { + "version": "9.1.6", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 16" + } + }, + "../../node_modules/marked-terminal": { + "version": "7.2.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "ansi-regex": "^6.1.0", + "chalk": "^5.3.0", + "cli-highlight": "^2.1.11", + "cli-table3": "^0.6.5", + "node-emoji": "^2.1.3", + "supports-hyperlinks": "^3.1.0" + }, + "engines": { + "node": ">=16.0.0" + }, + "peerDependencies": { + "marked": ">=1 <15" + } + }, + "../../node_modules/marked-terminal/node_modules/ansi-escapes": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/marked-terminal/node_modules/ansi-regex": { + "version": "6.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "../../node_modules/marked-terminal/node_modules/chalk": { + "version": "5.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "../../node_modules/marked-terminal/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/marked-terminal/node_modules/supports-hyperlinks": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/meow": { + "version": "9.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/merge2": { + "version": "1.4.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "../../node_modules/micromatch": { + "version": "4.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "../../node_modules/mimic-response": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/min-indent": { + "version": "1.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/minimatch": { + "version": "5.1.6", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/minimist": { + "version": "1.2.8", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/minimist-options": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/mkdirp-classic": { + "version": "0.5.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/mocha": { + "version": "10.7.3", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.3", + "browser-stdout": "^1.3.1", + "chokidar": "^3.5.3", + "debug": "^4.3.5", + "diff": "^5.2.0", + "escape-string-regexp": "^4.0.0", + "find-up": "^5.0.0", + "glob": "^8.1.0", + "he": "^1.2.0", + "js-yaml": "^4.1.0", + "log-symbols": "^4.1.0", + "minimatch": "^5.1.6", + "ms": "^2.1.3", + "serialize-javascript": "^6.0.2", + "strip-json-comments": "^3.1.1", + "supports-color": "^8.1.1", + "workerpool": "^6.5.1", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9", + "yargs-unparser": "^2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + } + }, + "../../node_modules/ms": { + "version": "2.1.3", + "dev": true, + "license": "MIT" + }, + "../../node_modules/mysql2": { + "version": "3.11.0", + "dev": true, + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.1", + "denque": "^2.1.0", + "generate-function": "^2.3.1", + "iconv-lite": "^0.6.3", + "long": "^5.2.1", + "lru-cache": "^8.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" + }, + "engines": { + "node": ">= 8.0" + } + }, + "../../node_modules/mz": { + "version": "2.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, + "../../node_modules/named-placeholders": { + "version": "1.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "lru-cache": "^7.14.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "../../node_modules/named-placeholders/node_modules/lru-cache": { + "version": "7.18.3", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/napi-build-utils": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/native-duplexpair": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "../../node_modules/nise": { + "version": "6.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/text-encoding": "^0.7.2", + "just-extend": "^6.2.0", + "path-to-regexp": "^6.2.1" + } + }, + "../../node_modules/node-abi": { + "version": "3.56.0", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/node-emoji": { + "version": "2.1.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/is": "^4.6.0", + "char-regex": "^1.0.2", + "emojilib": "^2.4.0", + "skin-tone": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/normalize-package-data": { + "version": "3.0.3", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/normalize-path": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/obuf": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/once": { + "version": "1.4.0", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "../../node_modules/open": { + "version": "8.4.2", + "dev": true, + "license": "MIT", + "dependencies": { + "define-lazy-prop": "^2.0.0", + "is-docker": "^2.1.1", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-limit": { + "version": "3.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-locate": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "../../node_modules/parse-json": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/parse5": { + "version": "5.1.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/parse5-htmlparser2-tree-adapter": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "parse5": "^6.0.1" + } + }, + "../../node_modules/parse5-htmlparser2-tree-adapter/node_modules/parse5": { + "version": "6.0.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/path-parse": { + "version": "1.0.7", + "dev": true, + "license": "MIT" + }, + "../../node_modules/path-to-regexp": { + "version": "6.2.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/path-type": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/pathe": { + "version": "1.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/pathval": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "../../node_modules/pg": { + "version": "8.12.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pg-connection-string": "^2.6.4", + "pg-pool": "^3.6.2", + "pg-protocol": "^1.6.1", + "pg-types": "^2.1.0", + "pgpass": "1.x" + }, + "engines": { + "node": ">= 8.0.0" + }, + "optionalDependencies": { + "pg-cloudflare": "^1.1.1" + }, + "peerDependencies": { + "pg-native": ">=3.0.1" + }, + "peerDependenciesMeta": { + "pg-native": { + "optional": true + } + } + }, + "../../node_modules/pg-cloudflare": { + "version": "1.1.1", + "dev": true, + "license": "MIT", + "optional": true + }, + "../../node_modules/pg-connection-string": { + "version": "2.6.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/pg-cursor": { + "version": "2.11.0", + "dev": true, + "license": "MIT", + "peerDependencies": { + "pg": "^8" + } + }, + "../../node_modules/pg-int8": { + "version": "1.0.1", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4.0.0" + } + }, + "../../node_modules/pg-numeric": { + "version": "1.0.2", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pg-pool": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "peerDependencies": { + "pg": ">=8.0" + } + }, + "../../node_modules/pg-protocol": { + "version": "1.6.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/pg-types": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "pg-numeric": "1.0.2", + "postgres-array": "~3.0.1", + "postgres-bytea": "~3.0.0", + "postgres-date": "~2.1.0", + "postgres-interval": "^3.0.0", + "postgres-range": "^1.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/pg/node_modules/pg-types": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "pg-int8": "1.0.1", + "postgres-array": "~2.0.0", + "postgres-bytea": "~1.0.0", + "postgres-date": "~1.0.4", + "postgres-interval": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pg/node_modules/postgres-array": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/pg/node_modules/postgres-bytea": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/pg/node_modules/postgres-date": { + "version": "1.0.7", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/pg/node_modules/postgres-interval": { + "version": "1.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "xtend": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/pgpass": { + "version": "1.0.5", + "dev": true, + "license": "MIT", + "dependencies": { + "split2": "^4.1.0" + } + }, + "../../node_modules/picomatch": { + "version": "2.3.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "../../node_modules/playwright": { + "version": "1.46.1", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.46.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "../../node_modules/playwright-core": { + "version": "1.46.1", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "../../node_modules/plur": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "irregular-plurals": "^3.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/postgres-array": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/postgres-bytea": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "obuf": "~1.1.2" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/postgres-date": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/postgres-interval": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "../../node_modules/postgres-range": { + "version": "1.1.4", + "dev": true, + "license": "MIT" + }, + "../../node_modules/prebuild-install": { + "version": "7.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/prettier": { + "version": "3.3.3", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "../../node_modules/pretty-format": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "ansi-styles": "^5.0.0", + "react-is": "^18.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "../../node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "../../node_modules/process": { + "version": "0.11.10", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "../../node_modules/pump": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "../../node_modules/queue-microtask": { + "version": "1.2.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/quick-lru": { + "version": "4.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/randombytes": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "../../node_modules/rc": { + "version": "1.2.8", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "../../node_modules/rc/node_modules/strip-json-comments": { + "version": "2.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/react-is": { + "version": "18.3.1", + "dev": true, + "license": "MIT" + }, + "../../node_modules/read-pkg": { + "version": "5.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/read-pkg-up": { + "version": "7.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "dev": true, + "license": "ISC" + }, + "../../node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "../../node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "../../node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/readable-stream": { + "version": "3.6.2", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "../../node_modules/readdirp": { + "version": "3.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "../../node_modules/redent": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/require-directory": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "../../node_modules/resolve": { + "version": "1.22.8", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "../../node_modules/reusify": { + "version": "1.0.4", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "../../node_modules/run-parallel": { + "version": "1.2.0", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "../../node_modules/safe-buffer": { + "version": "5.2.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/safer-buffer": { + "version": "2.1.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/semver": { + "version": "7.6.3", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/seq-queue": { + "version": "0.0.5", + "dev": true + }, + "../../node_modules/serialize-javascript": { + "version": "6.0.2", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "../../node_modules/simple-concat": { + "version": "1.0.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "../../node_modules/simple-get": { + "version": "4.0.1", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "../../node_modules/sinon": { + "version": "18.0.0", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.2.0", + "nise": "^6.0.0", + "supports-color": "^7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/sinon" + } + }, + "../../node_modules/sinon/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/skin-tone": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "unicode-emoji-modifier-base": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/slash": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/spdx-correct": { + "version": "3.2.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "../../node_modules/spdx-exceptions": { + "version": "2.5.0", + "dev": true, + "license": "CC-BY-3.0" + }, + "../../node_modules/spdx-expression-parse": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "../../node_modules/spdx-license-ids": { + "version": "3.0.17", + "dev": true, + "license": "CC0-1.0" + }, + "../../node_modules/split2": { + "version": "4.2.0", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "../../node_modules/sprintf-js": { + "version": "1.1.3", + "dev": true, + "license": "BSD-3-Clause" + }, + "../../node_modules/sqlstring": { + "version": "2.3.3", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "../../node_modules/stoppable": { + "version": "1.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, + "../../node_modules/string_decoder": { + "version": "1.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "../../node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-indent": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/strip-json-comments": { + "version": "3.1.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/supports-color": { + "version": "8.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "../../node_modules/supports-hyperlinks": { + "version": "2.3.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "../../node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "../../node_modules/tar-fs": { + "version": "2.1.1", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "../../node_modules/tar-stream": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "../../node_modules/tarn": { + "version": "3.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "../../node_modules/tedious": { + "version": "19.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "@azure/core-auth": "^1.7.2", + "@azure/identity": "^4.2.1", + "@azure/keyvault-keys": "^4.4.0", + "@js-joda/core": "^5.6.1", + "@types/node": ">=18", + "bl": "^6.0.11", + "iconv-lite": "^0.6.3", + "js-md4": "^0.3.2", + "native-duplexpair": "^1.0.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">=18.17" + } + }, + "../../node_modules/tedious/node_modules/bl": { + "version": "6.0.12", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/readable-stream": "^4.0.0", + "buffer": "^6.0.3", + "inherits": "^2.0.4", + "readable-stream": "^4.2.0" + } + }, + "../../node_modules/tedious/node_modules/buffer": { + "version": "6.0.3", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "../../node_modules/tedious/node_modules/readable-stream": { + "version": "4.5.2", + "dev": true, + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "../../node_modules/thenify": { + "version": "3.3.1", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "../../node_modules/thenify-all": { + "version": "1.6.0", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "../../node_modules/to-regex-range": { + "version": "5.0.1", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "../../node_modules/trim-newlines": { + "version": "3.0.1", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/tsd": { + "version": "0.31.2", + "dev": true, + "license": "MIT", + "dependencies": { + "@tsd/typescript": "~5.4.3", + "eslint-formatter-pretty": "^4.1.0", + "globby": "^11.0.1", + "jest-diff": "^29.0.3", + "meow": "^9.0.0", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0" + }, + "bin": { + "tsd": "dist/cli.js" + }, + "engines": { + "node": ">=14.16" + } + }, + "../../node_modules/tslib": { + "version": "2.6.2", + "dev": true, + "license": "0BSD" + }, + "../../node_modules/tsx": { + "version": "4.19.1", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.23.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "../../node_modules/tunnel-agent": { + "version": "0.6.0", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "../../node_modules/type-detect": { + "version": "4.0.8", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/typescript": { + "version": "5.6.3", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "../../node_modules/undici-types": { + "version": "6.19.8", + "dev": true, + "license": "MIT" + }, + "../../node_modules/unicode-emoji-modifier-base": { + "version": "1.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "../../node_modules/util-deprecate": { + "version": "1.0.2", + "dev": true, + "license": "MIT" + }, + "../../node_modules/uuid": { + "version": "8.3.2", + "dev": true, + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "../../node_modules/validate-npm-package-license": { + "version": "3.0.4", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "../../node_modules/validate-npm-package-name": { + "version": "5.0.1", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "../../node_modules/workerpool": { + "version": "6.5.1", + "dev": true, + "license": "Apache-2.0" + }, + "../../node_modules/wrap-ansi": { + "version": "7.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "../../node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "license": "ISC" + }, + "../../node_modules/xtend": { + "version": "4.0.2", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "../../node_modules/y18n": { + "version": "5.0.8", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "license": "ISC" + }, + "../../node_modules/yargs": { + "version": "16.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-parser": { + "version": "20.2.9", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-unparser": { + "version": "2.0.0", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "../../node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "../../node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "../../node_modules/yocto-queue": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/kysely": { + "resolved": "../..", + "link": true + }, + "node_modules/typescript": { + "version": "4.5.5", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + } + } +} diff --git a/test/outdated-ts/package.json b/test/outdated-ts/package.json new file mode 100644 index 000000000..3ce68bf4a --- /dev/null +++ b/test/outdated-ts/package.json @@ -0,0 +1,19 @@ +{ + "name": "outdated-ts", + "private": true, + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "tsc --noEmit" + }, + "keywords": [], + "author": "", + "license": "ISC", + "description": "", + "dependencies": { + "kysely": "file:../../" + }, + "devDependencies": { + "typescript": "4.5.x" + } +} diff --git a/test/outdated-ts/tsconfig.json b/test/outdated-ts/tsconfig.json new file mode 100644 index 000000000..4e0948262 --- /dev/null +++ b/test/outdated-ts/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../tsconfig-base.json", + "include": ["./**/*"], + "compilerOptions": { + "skipLibCheck": true + } +} diff --git a/test/typings/shared.d.ts b/test/typings/shared.d.ts index 9a7bc1afd..741453df2 100644 --- a/test/typings/shared.d.ts +++ b/test/typings/shared.d.ts @@ -1,9 +1,4 @@ -import { - ColumnType, - Generated, - GeneratedAlways, - JSONColumnType, -} from '../../dist/cjs' +import { ColumnType, Generated, GeneratedAlways, Json } from '../../dist/cjs' export interface Pet { id: Generated @@ -71,21 +66,21 @@ export interface Person { export interface PersonMetadata { id: Generated person_id: number - website: JSONColumnType<{ url: string }> - nicknames: JSONColumnType - profile: JSONColumnType<{ + website: Json<{ url: string }> + nicknames: Json + profile: Json<{ auth: { roles: string[] last_login?: { device: string } } tags: string[] }> - experience: JSONColumnType< + experience: Json< { establishment: string }[] > - schedule: JSONColumnType<{ name: string; time: string }[][][]> - record: JSONColumnType> - array: JSONColumnType> + schedule: Json<{ name: string; time: string }[][][]> + record: Json> + array: Json | null> } diff --git a/test/typings/test-d/expression.test-d.ts b/test/typings/test-d/expression.test-d.ts index 8c2180c4b..0b88fc81e 100644 --- a/test/typings/test-d/expression.test-d.ts +++ b/test/typings/test-d/expression.test-d.ts @@ -4,7 +4,13 @@ import { expectError, expectType, } from 'tsd' -import { Expression, ExpressionBuilder, Kysely, SqlBool } from '..' +import { + Expression, + ExpressionBuilder, + Kysely, + SqlBool, + expressionBuilder, +} from '..' import { Database } from '../shared' import { KyselyTypeError } from '../../../dist/cjs/util/type-error' @@ -260,3 +266,16 @@ function testExpressionBuilderTuple(db: Kysely) { .$asTuple('first_name', 'last_name', 'last_name'), ) } + +function testExpressionBuilderConstructor(db: Kysely) { + const eb1 = expressionBuilder() + expectType>(eb1) + + const eb2 = expressionBuilder() + expectType>(eb2) + + const eb3 = expressionBuilder( + db.selectFrom('action').innerJoin('pet', (join) => join.onTrue()), + ) + expectType>(eb3) +} diff --git a/test/typings/test-d/generic.test-d.ts b/test/typings/test-d/generic.test-d.ts index 77e02a408..d961ba5f9 100644 --- a/test/typings/test-d/generic.test-d.ts +++ b/test/typings/test-d/generic.test-d.ts @@ -81,18 +81,6 @@ async function testGenericSelectHelper() { .execute() } -async function testGenericSelect( - db: Kysely, - table: T, -) { - const r1 = await db.selectFrom(table).select('id').executeTakeFirstOrThrow() - expectAssignable(r1.id) -} - -async function testGenericUpdate(db: Kysely, table: 'pet' | 'movie') { - await db.updateTable(table).set({ id: '123' }).execute() -} - async function testSelectsInVariable(db: Kysely) { const selects = [ 'first_name', diff --git a/test/typings/test-d/huge-db.test-d.ts b/test/typings/test-d/huge-db.test-d.ts new file mode 100644 index 000000000..a6d676f38 --- /dev/null +++ b/test/typings/test-d/huge-db.test-d.ts @@ -0,0 +1,3238 @@ +/** + * This file is more of a performance test. The tests in this file will become + * extremely slow if type performance regressions are introduced to the codebase. + */ + +import { expectError } from 'tsd' +import { ColumnType, Kysely } from '..' + +export type Decimal = ColumnType + +export type Generated = + T extends ColumnType + ? ColumnType + : ColumnType + +export interface Table0ec723c3d4ee7229ffba2a11539b0129 { + col_4ea20fbed0c11321d0d5e8c50873ad43: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablec67d8be002857dd3a70a2c4edaa4671a { + col_869cdfb59eef781ebd6a3b78e43344e6: Generated + col_b8a21c4934fdc0366222c19c14b9e1b9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_40cee1e4d1c6b882095d5d343de8a0e2: Generated + col_458d5f1afc81ae7291a7aaad852dc12a: Generated + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_105b287b6f42e3e08bccae5fa0bc1e57: Generated + col_b53dab55eaeda66574268ffea2dd4da0: Generated + col_0e46a6ad6b83de719c1b5b777e48c8c5: Generated + col_aff776838092862d398b58e380901753: Generated +} + +export interface Table3face097074d5d4ea47610accdd3ffc1 { + col_7d5c32a33ff432c746e4d4e37423df3a: string + col_b4e2525113738f1ed80758dbdfc77c51: string + col_d62f4d956a18fd3eec07e560acd55b59: number + col_f32428508672211d04f041977bc90510: number + col_072e823de1daac617e83074311b89962: string + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tableed617265d2d72c8e748ff8796bfa04c4 { + col_d9bc3ceaea0dddd80b93a2b5c5a7f827: number + col_3b04aeab47e304b0ae167274f324d5d3: string + col_b4e2525113738f1ed80758dbdfc77c51: string + col_7213e317986c96016a753182775fc7e0: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated +} + +export interface Table6dc0e4bf3b08bdf7391e5d833d1673d6 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_4ab5b1dd04a8cefd62107890b80103cd: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table2f01d1d7b29ae047871b62964df1ecc3 { + col_2ba95af0fa085c5e3cc3a55e48532985: number + col_7426b7174c1b7d22061329a60b94e63f: number + id: Generated +} + +export interface Table9f50dbe0b662b9cea0d016836eb72504 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table4b8e90e811d962e132f9550bc90d5443 { + col_869cdfb59eef781ebd6a3b78e43344e6: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_40cee1e4d1c6b882095d5d343de8a0e2: Generated + col_458d5f1afc81ae7291a7aaad852dc12a: Generated + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_105b287b6f42e3e08bccae5fa0bc1e57: Generated +} + +export interface Table0ae6c699b7b44b166093c052150a0d36 { + col_0dc6bca1e7fe092ff816894c1f2fcada: Generated + col_3f706bc8748ebe9b1edfcb4e2e03e4c5: Generated + col_e6892b0d5da4a0f546f52b29d82aab71: Generated + col_09d498d9fabfec1c421acb34c996c0f2: number + col_78a802ff9c1d651d6a168acdf039c4a7: number + id: Generated +} + +export interface Table2e45370c867ddf8f0ca7710b63dd2746 { + col_5e9ee2aa243c91c65fbf94a31806496d: string + col_7db3960deab1cd20d8b5b1f5501f3987: number + id: Generated + col_910c87c70d93d69a64538ffc358a99de: 'detalle' | 'referencias' +} + +export interface Table19f57540d944441abc6dcebc976adf96 { + col_5e9ee2aa243c91c65fbf94a31806496d: string + col_603225ce2d6e2ff429bde293c04ad734: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table1d1b84f13a74383d5b0324a011b609c6 { + col_bca1167f466e892a6e32edf82abd97bf: number + col_0edb7526b7143126ccfb957dd13caaeb: number + col_f9c22b71f730f5257411ff5461646fe8: number + col_e439bf701f76b768053c59bd57f81f7b: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date +} + +export interface Table42dbaa8105cb92599360aa5169283403 { + col_bca1167f466e892a6e32edf82abd97bf: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_b1dc1e3377a082304d817664243e7b17: Generated +} + +export interface Table2f81c25612f8fefd026b753a1753974a { + col_f9c22b71f730f5257411ff5461646fe8: Generated + col_6ccc67f5bce269cfd6973525010692a0: Generated + col_fb56864b5d334395e35ec45174902736: number + col_d812f85f291b30d4782f9accdc973515: number + col_fb3c6ec7d586e24e823cb17a11e0de45: Generated + col_a538a4b49163b8abcdcff07958d6290c: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fed6fd6b4a682868e85af10ef151f374: Generated +} + +export interface Tableded2bdb12664e58a26152ebb5fe676bb { + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_41bad005d542c027f208773d3f0f4a28: number +} + +export interface Table1c765aad5af6c98fb0ef475fadda911b { + col_6a59e77ab0765a9b1e48a245087e5bbd: Generated + col_f9c22b71f730f5257411ff5461646fe8: number + col_6ccc67f5bce269cfd6973525010692a0: Generated + col_fb3c6ec7d586e24e823cb17a11e0de45: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date +} + +export interface Table23e7a1e5ab953d2a85a5958458d0d824 { + col_fb3c6ec7d586e24e823cb17a11e0de45: number + col_3d54e846d74728347124d4872f3d61b4: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_910c87c70d93d69a64538ffc358a99de: Generated + col_41bad005d542c027f208773d3f0f4a28: number +} + +export interface Table41bb6a93b802fe08f0b054ae835e2fe4 { + col_603225ce2d6e2ff429bde293c04ad734: number + col_f9c22b71f730f5257411ff5461646fe8: number + id: Generated +} + +export interface Table8be6c29eada2e2ef68bef0c9c1401a97 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_c010021498d7345dadc4ec5be041f8d2: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_c37d5771c5258f10ea31baab67cba178: Generated +} + +export interface Tablee91e54a2c273ec3221b4d98ae8d79d12 { + col_c7062aaaa576936166196ab3c2e3342d: number + col_4ddfa5e839c6a6dacce57d66df206943: number + id: Generated +} + +export interface Tablebb08e5d0fa8fd6089eeeb1ba950944a1 { + col_d08c3aaad1d4c926a4bf283098fcc325: Generated + col_fb56864b5d334395e35ec45174902736: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_249c850f62ea50feb918b095fc56d763: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablecaf406ab258ff4b54413265206d55b45 { + col_f9c22b71f730f5257411ff5461646fe8: number + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_95a573b127ca2c23a2ed1dbc7d03d29e: string + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Table90ffcbc2bfc57b68acac037b0aeae3d4 { + col_6a59e77ab0765a9b1e48a245087e5bbd: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_15e729f544f76d3d0ad6bc3de492f077: string +} + +export interface Table1e2c9919a848fb2673ac28780aba041c { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_50cbd0336a73919113afcca87d9d1e48: string +} + +export interface Table4f240fba2b420e220c97e6e14c4819c6 { + col_869cdfb59eef781ebd6a3b78e43344e6: Generated + col_1d9d9279776c5549212200cb14336162: Generated + col_74bf7a1e74042c7a207b4e4d6144b8a1: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_4f84013a8b5e4c2b7529058c8fafcaa8: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_c55b5208e65984aac86ada39165d9d62: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_1f6eddf77651742ff1d83404930b09ae: string + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_8b5da04bf1aacd462ab37eec2f0dea98: string + col_3917508388f24a50271f7088b657123c: Generated + col_eb6047359d3711dac3175270345f5c3b: string + col_0169235b1b604520a263cfa57a00b7a2: Generated +} + +export interface Tablec97e3cdd896ff553853d7817e4a866e2 { + col_08b4d026d42ae768f63552c6de119d71: Generated + col_066a120fe3abe924fdd105d2073b3a64: Generated + col_a4effcb9a007ae19664a1e3b0704e92f: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_555511eb2ff60ace56c0128985d10cb5: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_35772ed8414e25ad46fc4b92e07853a2: Generated + col_4a7f3834f24f1c5e95aded0726c807e2: Date + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + col_ff9d87789325c168e0e8272e8d138a21: Generated + col_7a9cd04d755a1c1f269ce7184b943521: Date + col_7426b7174c1b7d22061329a60b94e63f: number + id: Generated + col_aac430b49cc975fb51fed9e6d9856548: Generated + col_2cf1ecc054fac526249f379db15f6114: number + col_89addf722cc48ff1df7954f97e20b10b: Generated + col_2fc68d3ca47f71df3c84961997e28d69: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_0191c0aa0d39de591b5236b304496123: number + col_f230bd30a85e2ec6bc2da7b727544ed6: number + col_f609bfdeed2c51dbb142fd03bddfd02a: number + col_2c4a4b433aedea3b93e0243fba4062f2: number + col_080cbfe43a25572bb2a66634b6d5dce8: number + col_5c63e943a6e825630ccaefcbed7a719b: number + col_a615c4f966221bfcfb8eac6397f4562e: number + col_a6925a86b76a07e17077ffd5f2990e7b: number + col_83750383555947e4ccbd9661a0948ffe: number + col_5c82df9ac5a4aec30ad4eb89769fbcd8: number + col_4ca76cee384ffac98c8a3e3c8a61bfeb: number + col_95b1eb6ceb5082a8b459a4722417922d: number + col_7d39847d54a6fc52735c6a250cfce5eb: string + col_345e4aa36e0fb44379bce371c87b70f4: Generated + col_910c87c70d93d69a64538ffc358a99de: number + col_3356a84dafce383906e79fffee87d8bf: Generated + col_b14411549804e01414d6ad1481680844: Generated + col_270d34ae82d8c18c7b46e83fd3556a59: Generated + col_9abb4592b230f6a6fa4214f5d86aaa4d: Generated + col_d512407d4f684d1284b36763038e0ed3: Generated + col_9b4ca322bec71dd7f0296cef261ae8ec: Generated + col_0aff87eb8d3d48fa89e873060f0715d4: Generated +} + +export interface Table4974bbdf9d728fb538d7507cb9f84842 { + col_77df54ec5f2bfd959a54c423b59c0d38: number + id: Generated + col_ee96bf5f8ef3f927a1a7fc723df4cd90: number + col_5607e33e4ae68a12af15c4fa9ada5c93: number +} + +export interface Tablea3c8286fc7df926fbf05e09a03e2ac77 { + col_77df54ec5f2bfd959a54c423b59c0d38: number + id: Generated + col_ee96bf5f8ef3f927a1a7fc723df4cd90: number + col_5607e33e4ae68a12af15c4fa9ada5c93: number +} + +export interface Table39bdacc8b55267ffc8bf75ff8ec564ce { + col_fee6d937834161cc73b3698fee871f5c: string + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_9b0c62311c53c898ce6699696d685a14: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_95a573b127ca2c23a2ed1dbc7d03d29e: string + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_25980343ed3b4c231a154e5e88396938: number + col_fb1ecce130681efa10fd55197773267d: number + col_d8ad55006c0efc8437cc487b5c5459f6: number + col_01abc2f9e295923216e8462e3a88bf5d: string + col_89ea1e31584f13b90dfa66a76569e69c: string + col_ea7e482493b72c75cf90057ba252352b: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_f8b0d195967998d8afabe1b39912ae34: string + col_ac339ab9133743c084a804cc83010c7a: string +} + +export interface Table3d68aac4deb5f76aaffa0df8c01e305a { + col_c50368ae5e839e9224eb0947f06fc605: number + col_a9564ebc3289b7a14551baf8ad5ec60a: Date + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: number +} + +export interface Table90a64fc3cea5bc905374973771cafcd3 { + col_764a70ee8bb195d3475253200bf2e297: number + col_80ae6f72f9c170f9e1bcae48c1677802: number + id: Generated +} + +export interface Tablec479a580bb37024884d940eeacc9c4aa { + col_764a70ee8bb195d3475253200bf2e297: number + id: Generated + col_b2211a70f2ff7369336027ed47f18f7f: number +} + +export interface Table1d62a6c4a9763009cda042181b0c48af { + col_bd4e67d8c3f68e4b7117a7a88e22b287: string + id: Generated + col_e245eb517472187d10441eca2c4a9aeb: number +} + +export interface Table916f65bd1433290f26613ccd976c68a7 { + col_0c22ebe1ceea12bbe3dade54d797497d: number + id: Generated + col_53f18391d7b465f6918d73498af5abf0: string + col_bfd8f7ddc31266f25afd1b6ea43d8750: number + col_b9091a846b34e0fac6de153fa4634c7b: Generated + col_0e46a6ad6b83de719c1b5b777e48c8c5: string +} + +export interface Tabledb34593d7377d2007d44ba4b47dcec97 { + col_08de056b6d3139a95d0aaf99f8e3c52e: number + col_a538a4b49163b8abcdcff07958d6290c: number + id: Generated +} + +export interface Tablef7d7a7557d9db50bd40fe14bd830b9d4 { + col_25cd93f430d277509b60d4390636895f: string + col_352ea8d15082ec4cd9b5ffb25fc99c71: number + col_6d210c02b9f9e0fd7c6bb98e4b23d240: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_46e6bd185eb3c01ad5692d9ab01733b8: number + col_26286361ce53d0207945814927712ac2: number + col_2245275cb6562821fd22d2523a2667e8: Date + col_955e7ed9557ee9c44c59bf005ea23d2d: Date + col_1139ca108352fe62c38518aeb04c824d: string + col_699b1539895a99ae5b9de4f5e8006d7c: Generated + col_189501ea5ae0d0ec760d5848ef9b58e4: number +} + +export interface Table309c66af6ff8ccb2dcf123e1af40c9c4 { + col_821c248ea5f31b36e1fef43cbcf38495: number + col_49a7abbdc564bf92a27c31a936047cda: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_c6080ec65b20eed8dd083f2ae705fd28: string + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_1f98c1057055738f2125180731cb2d39: number + col_1d119125897e514751e695fab638cf81: number + col_ed9d312bfff3b171743cff4aa1954294: number +} + +export interface Table8921b63f9cb21e8293a8c1ddd9edc866 { + col_0a3a5156d1abf43e019d933129cf1d3d: number + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table2037e68416ae40369fba0a939e7ac693 { + col_6137cde4893c59f76f005a8123d8e8e6: Generated + col_a7743b12384fd798fdad7bff9e75bee3: Generated + id: Generated +} + +export interface Table2b3f160083004c6c92a2ce1faf87067d { + col_25cd93f430d277509b60d4390636895f: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_62bd695be89e0f07c72268b40df9c2db: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_34e7aea5cf0f74ee76b3f5445a3ac1cf: Date + col_c84d2025f9e13529cf7b4aa05275bdf6: Date + id: Generated + col_2fd6a67502ba2fc6e63b23903522d93b: Generated + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_97ec9689eca8dace826b37d2ed59250b: number + col_3f9be60473c4a309579563a7358c92f8: number + col_910c87c70d93d69a64538ffc358a99de: string + col_07b01206d9860575d30d3b2bdc4ef8b8: number + col_6200d8f84ce77a52a86aecf31d7ac101: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table5135075fea7b2d1c93603df216620907 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_47800dcca216b1b165c13199d66c3b63: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_e7fa32cb05ba9ddc8d5f75bdf1694790: string +} + +export interface Table5d4433ff31ef75511e70aa6e71495afe { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table9e258b1708bd64e877d6cca1467dee66 { + col_821c248ea5f31b36e1fef43cbcf38495: number + col_8a79872b2fd9eca20ec1e0823abe36fa: Generated + col_8ba45d6c9fbc6997e452dc62a60c32aa: Generated + col_66dc451da6180c375f5eccf6a178abbe: Generated + col_4a375049db156d117c5ad35214dfe424: number + col_535325947cf44473a2c18fad07fe9457: Generated + col_49a7abbdc564bf92a27c31a936047cda: number + col_030b50b01f2428db7db79395842e60de: Generated + col_50d92f9a5774b1f89abbbc4ac7f546f0: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_62bd695be89e0f07c72268b40df9c2db: number + col_cc9b81b3318668e7bd040b871602eafd: Generated + col_970dbef257f683fb01a38f38a4086cc5: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_c010021498d7345dadc4ec5be041f8d2: number + col_4649c587e02b1a41f7eb4967032e10c3: Generated + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_60c9259051ec33ce67fb8dbca8cc0a49: Generated + id: Generated + col_e923cd6ce39f1ad88fcf58e070574612: Generated + col_6fcadaf6349923a75d54632571ccec9d: Generated + col_e1dfc335e98f95a54ebb2a3335b71817: Generated + col_a5846a54856ff3e7e3427506de9f791c: Generated + col_a846adea5ee689d2a11a692bafbc2dae: Generated + col_50eed02f38aae94f07e41395a64cf64b: Generated + col_5b75dbfc85a5e0870a34cc3bfa2cf2ae: Generated + col_2700d8a25d8d8e80c4ad5b622ea5dbec: number + col_7d39847d54a6fc52735c6a250cfce5eb: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_8f986281fe440bb551e6baa8d3ed2a28: Generated + col_7f4c1276d300132fccd6f6d32ccb3002: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated + col_d849e38a75aa2b36a69eff901e6af371: Generated<'auto' | 'validado'> +} + +export interface Table4ed17d356988e97fe63e4b4e3b060917 { + col_2e6b22e3aeade4be1854aa4191f7b786: number + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablea95d291bccf0be8becb18282bcbf93a9 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_9dd1bc5c639dd9f27a30853ccf20cf02: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablee12f5b7476cba16c3b1480cd551d2b42 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_2d1dc1e61d32d9314f690ef19eb8f9fd: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_1cbcac9ade6914a00f55838acea44222: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_806b0741c2f0a4352120014e6e8da433: Generated + col_0e5abe8ffb47ede536aabfba66a14e05: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablea6ca43be611a38117221fef4c761f97d { + col_a538a4b49163b8abcdcff07958d6290c: number + col_843fac686ca11587b97725cce2efc1d3: Date + col_2d1dc1e61d32d9314f690ef19eb8f9fd: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_1cbcac9ade6914a00f55838acea44222: number + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_59ec69fccca64cd638f1a7bf443b435c: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablef83eda9e66948a4da342fadf183e32c3 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_983e58ca1a916d68762b2e241424e85c: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tabledfc2f0e19fe1c0e8dd04191a3035bac8 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_be69efe0e6bc75464cc24f246e61a62d: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table93f030da0924f35ab2e57081dad1e2fb { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_22bd050ad65b2aa12639b75318b0864b: number + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table59fc5666d6be52faaeb255fb48a401ef { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_fd21606544b271feae0784633a57d457: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table29c7f8f8df026c49d8ea3ad088e8780a { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_a1625f77580ae88538a0bba96298b5ba: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table2e5e86f744edaeea91caedf4496cd21e { + col_8a79872b2fd9eca20ec1e0823abe36fa: Generated + col_8ba45d6c9fbc6997e452dc62a60c32aa: Generated + col_a538a4b49163b8abcdcff07958d6290c: Generated + col_50d92f9a5774b1f89abbbc4ac7f546f0: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_62bd695be89e0f07c72268b40df9c2db: number + col_0a1609965fcbf80a8d9847074a93618c: Generated + col_970dbef257f683fb01a38f38a4086cc5: Generated + col_95a573b127ca2c23a2ed1dbc7d03d29e: Generated + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_a67abae8eff833edb8b78a2ded44f0b3: Date + id: Generated + col_a0102029c5185262158dcdb7c1ae4f51: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: Decimal + col_e85e859e6b11ce398d9c6ba4466648c2: Generated + col_6fcadaf6349923a75d54632571ccec9d: Generated + col_bd5c3d71904e9ae0f0e22b76c11590fd: Generated + col_5b75dbfc85a5e0870a34cc3bfa2cf2ae: Generated + col_910c87c70d93d69a64538ffc358a99de: string + col_ad3ab5438edd60f6c8638824072acd87: Generated + col_b1146d17cb361aeddbb1108e39afbfd5: Generated +} + +export interface Table27112b32955bc32b3cf3abc78f6041f7 { + col_f32428508672211d04f041977bc90510: string + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_2f6e73ed4e950f4879aa2dc43e832206: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_e245eb517472187d10441eca2c4a9aeb: number +} + +export interface Table6a8129f282adc469ee9233bcf63f20b7 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aeffdc77f4dde5fd265842bc848e92d1: number +} + +export interface Table55cda7b389c3f5e26b58e806dc82d6cd { + col_0f38d1a543b96eb8d34b6fcdc9227445: Generated + col_aa0ae4d63455847b0b02a481f9f38ab7: number + col_05f720d878e84cf5edf8810ac56f2f47: Generated + col_b599f327b0f1350c83e6466016f68dee: string + col_3c21e15fe7f88da04c6eb6546f1f0c45: string + col_55caff057cf8c83fe28641f2903d6bcd: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_e3c09cb3d68235ebdf5820c49f6ef2e0: Generated + col_d48e0f172023094addf3ba3611199190: string + col_c010021498d7345dadc4ec5be041f8d2: number + col_c613b7206854402371564704dbd689db: string + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_d69c485b8a1572710f1a3736bd1ac46c: Generated<'no' | 'si'> + col_032711695edadad1acb9974d043ec642: Generated + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_8b5da04bf1aacd462ab37eec2f0dea98: string +} + +export interface Tabledddb567693b67dedccc76feeaf305885 { + col_05f720d878e84cf5edf8810ac56f2f47: Generated + col_b599f327b0f1350c83e6466016f68dee: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_e3c09cb3d68235ebdf5820c49f6ef2e0: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_c613b7206854402371564704dbd689db: string + col_cd241d70370d7d244f5103c80efc4b61: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_d69c485b8a1572710f1a3736bd1ac46c: Generated + col_3cc361b85f6e092837024f5ab2bdc2fe: Generated + col_032711695edadad1acb9974d043ec642: Generated + col_ef1e84bf5d70755290854b1d0d60c91f: Generated + col_8b5da04bf1aacd462ab37eec2f0dea98: Generated +} + +export interface Tableb45f137169628885a5507a98a1fd203b { + col_f32428508672211d04f041977bc90510: number + col_f77bbbe9a817f1a5818e71efaa20b892: string + id: Generated +} + +export interface Table4d0fb43fef8f71d027e1c62ff7b83c1f { + col_f83b4cd2b2e7335a200c2da830132390: Date + id: Generated + col_fde60bdc79a24d633ee18347600cb41d: string +} + +export interface Table26d9e67842818bfccbbfca6020d3441a { + col_f32428508672211d04f041977bc90510: number + col_f77bbbe9a817f1a5818e71efaa20b892: string + id: Generated +} + +export interface Tablee6de3a3fdf132b2b794ad9358fe01719 { + col_748f83ef971bb7d351a413adbf1e8901: number + id: Generated + col_7bc8772e9a79ea91b67b0fe68827dd3b: number + col_428661c5270745369a9118d95829ff49: Generated + col_b200a854685602c04809e2fad82ee47b: Generated + col_54b8d01ca49e18a004dd65e012f28c4d: Generated +} + +export interface Table5bdeb7407d8776f9295b3ae2eb482855 { + col_f32428508672211d04f041977bc90510: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated +} + +export interface Table259a82d9d67d1b779666191753027e2d { + col_b606d1948094a48e695e46b18cf977b1: Generated + col_4f1b7b2483b9bb0a8b355ef69f09d65e: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_672a81e3795c2fd45450d85e0d3703e1: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tabledfcfa50cfe70d46b898ed0fe276855e4 { + col_53ca581ab7a5aef5b659bc27c81d5d51: string + id: Generated +} + +export interface Table11e00101e1b2f60d0a2acfcf46151908 { + col_f4dffeda79e0ee34f16d57241b615f53: Generated + col_b738ecc416fa96f41459da0404cdbf50: Generated + col_25cd93f430d277509b60d4390636895f: string + col_44381c5d8d2d9361dd21bb7a7facf4b0: Generated + col_0259f6499a0cb3f370a6119054eea3f3: Generated + col_b6fec9e01d482caca6ab785b9c508583: Generated + col_fe3144cfd0702470a18811a50b2a773a: Generated + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4a2d849a39589cdab1bef664bbaf662f: Generated + col_5306bd08c84506786847c551137592aa: Generated + col_f901883e4b25324963cbb061fed4eaec: Generated + col_bb8f173dd39e2bbd2ca8bb502bdd5d7e: number + col_645e3472df388d4789ad6a12715cc7a9: Generated + col_eade66be3d5c19459dbb52d65e58a9ff: Generated + col_78f5ba4e82866b7d30d1c63b058b5042: Generated + col_ed68df9dcbc6be1e74aa52f2aaac27b3: Generated + col_9b0c62311c53c898ce6699696d685a14: Generated + col_a19773e01d56a8727f9b50bfd98b67a7: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_95a573b127ca2c23a2ed1dbc7d03d29e: Generated< + 'aceptado' | 'rechazado' | 'recibido' | null + > + col_7e208df123f1106ac3cf9c9ce582df87: Generated + col_78729121eb966294e69d86f8b656c99d: Generated + col_cac71ab1db07fe38f5915b92b9959348: Generated + col_6310539ac8c0b13a896e8b9634e1e0c8: Generated + col_8d66d088a1a8bcfb6a7477360f1a03e4: Generated + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + col_bbeb11288ba33af45a8a7251cb87da2c: Generated + col_e199cc093d54f6c562ad8d547976c5df: Generated + col_e26de993b80283e73a98d2f5a7655e44: Generated + col_7a9cd04d755a1c1f269ce7184b943521: Generated + col_7426b7174c1b7d22061329a60b94e63f: number + col_1cc17f0951cd6972739a3cf858f985e2: Generated + col_0364c29fe7237f4f6ffba597544b4f46: Generated + id: Generated + col_2499572f76367bcbe5ea0e76d6a53cfa: Generated + col_3f38469c48f069fcc4f623bca8c587f6: Generated + col_d6ffe41368d46575efb6f237e05643f8: Generated + col_387852799fd39a75bb0ffbb3a088106e: Generated + col_ea14b84c81e7ebecb1faf4ce83b8826b: number + col_9a4570bd056ea2d9dd0a6dbb83206443: Generated + col_4002e95484dd522e663c6fac8757d914: Generated + col_01b47914fe373f6ade80d5d3afef6847: Generated + col_a3c438c6f272e35cd2f6e1a4f59dec67: Generated + col_ef8a0d1ea2ae246640e55a5f585324f4: Generated + col_256cd843e152753550cd6aa845f56fd8: Generated + col_6360ba5916d4e8415f464336177c02e7: Generated + col_5410929b23ebb3020d600feea427cdb7: Generated + col_2924351c3f723a33dfd4dc659a06be9c: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_83ca342b1dd50c4c7999010b9ad6683a: Generated + col_43c33f96a8b44d501f45cd6b9382f9df: Generated + col_7b4b1dd4aafa937e34cb562a048e4fbb: Generated + col_0191c0aa0d39de591b5236b304496123: number + col_2baa55cecfe99708f15031b74cdd7d36: Generated + col_9e2f281c14fe1c305bf0613edb1b5467: Generated + col_cb9ad148d424c04f44d3959334b394d9: Generated + col_9bba3bbc7094c759a61d84f8605ba3b7: Generated + col_5c63e943a6e825630ccaefcbed7a719b: number + col_41e744edec4d69e40ddd093f4e1b84aa: Generated + col_83750383555947e4ccbd9661a0948ffe: number + col_02f2a2f220f28476f9c5ae7f0edfc060: Generated + col_6052d6d42f76bc5ee164f458689e7274: Generated + col_1044fcff754bb0008ba077f4fdc005f4: Generated + col_bcbc405c655f95f2343eb1fb3288a05b: Generated + col_aeffdc77f4dde5fd265842bc848e92d1: number + col_870d427af1d948c352eea11ffd952d1d: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_8ccb00b1ec3203ead93c89b315af7cfa: string + col_f8b0d195967998d8afabe1b39912ae34: string + col_0db72b58ea6b0b1a2468f44c3a154621: Generated + col_75afa9f93f59b9a0da5fc050cf61454d: Generated + col_3b24e1adfd3713e88eb334dd342f072b: Generated + col_8c36708787079d53e4bb54ddc6d4cc93: Generated + col_910c87c70d93d69a64538ffc358a99de: number + col_99b14a294256f4d99bff89feb7483caf: Generated + col_6dbc88c5b052629e050a099e04d7be3f: Generated + col_f1f2f079861a9877106a6209fe34974d: Generated + col_b96e29426fd3636dd5bc9ce5b03a13df: Generated + col_416bce439c6a2ac5ac9dbd1b0947e48a: Generated + col_079842fe7e15f5de8a65e411c9df3787: Generated + col_0aff87eb8d3d48fa89e873060f0715d4: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number + col_2923af0fb0193af631f34d210c0247df: Generated +} + +export interface Tableaa828347830464c8d6fb6070585f8786 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_bbe02f946d5455d74616fc9777557c22: string + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date +} + +export interface Table5e1a250360f2e59810faaec5dec74bfb { + col_4f1b7b2483b9bb0a8b355ef69f09d65e: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_7db3960deab1cd20d8b5b1f5501f3987: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablecb67af6a70220cf4b2c4e1121d9351c6 { + col_c2794c3a6a63d8743b9aa8499f407b15: string + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table01687ac6f71bbab86d7fb8482bf71301 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_80ae6f72f9c170f9e1bcae48c1677802: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated + col_16f39dcb91dd929ebf8bea9f30568523: number + col_0e759e13c162a5f46e9c6ad11ff37c68: number +} + +export interface Tablee4612831426584576f2d39997ccac9c8 { + col_6a59e77ab0765a9b1e48a245087e5bbd: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: Generated + id: Generated + col_84267f80102ea16f25ffe6f5be92255e: Generated + col_c55b5208e65984aac86ada39165d9d62: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Tablebca1b3f3c2526216b2f01c01fa85f3f9 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_47800dcca216b1b165c13199d66c3b63: Generated + id: Generated + col_c55b5208e65984aac86ada39165d9d62: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Tablecac2eaeb16e94e019e7e98240c4bac17 { + col_3886a084aa5ac96babd5443af176b2fa: Generated + col_e91148e8d587cad1668a1e01d4701bd4: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_756c412732c9e787f483d35d939b8ef2: Generated +} + +export interface Table7eb5460a0c6690c1dff53fe4940240db { + col_2f76db193eac6ad0f152563313673ac9: Date + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table5c88bed5704d2054a84d44150bf10f21 { + col_f60a220f6974819d5fb5760aed1c4cd0: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_756c412732c9e787f483d35d939b8ef2: string +} + +export interface Table148eb9256ed9e01df75e345bd7e5c9f7 { + col_d109701b76ff710c8e7fddd648466bac: string + col_066a120fe3abe924fdd105d2073b3a64: Generated + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_4f84013a8b5e4c2b7529058c8fafcaa8: string + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_3917508388f24a50271f7088b657123c: Generated +} + +export interface Tablee2c77a8b952bdea3bc2cb7261168ec45 { + col_c06fbc27fba97ced26a9d976caa41a75: number + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_a94fa2fac7c75e7343d9de23fa2ee836: number +} + +export interface Tableabd2380e09dc7a608bb7e5c33654540e { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_2cf1ecc054fac526249f379db15f6114: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_f136803ab9c241079ba0cc1b5d02ee77: string +} + +export interface Table7117bf3bff290101f4fa6d6de627b58f { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_8b5da04bf1aacd462ab37eec2f0dea98: Generated + col_f136803ab9c241079ba0cc1b5d02ee77: string + col_20be803fa76256ebff5a3090a351dce6: string +} + +export interface Table202a1f7684d2c58afd3885112de82158 { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_f136803ab9c241079ba0cc1b5d02ee77: string +} + +export interface Table93aeee94c0d8d4e08a56c97185d68ae7 { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_f136803ab9c241079ba0cc1b5d02ee77: string +} + +export interface Table70c085cf2d0edd14f7dbae474f064b1c { + col_495188e3a36574928230c0e978a9c24b: string + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated +} + +export interface Table2b11443e8af088b453d5119d135803ac { + col_c380dabd328dc1bc21400bb6319fe82e: Generated + col_46df0ccd51bb26538db287f8e4e6e4dd: Generated + col_f32428508672211d04f041977bc90510: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_6f2528e6259a627108655e46967927b1: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_40cee1e4d1c6b882095d5d343de8a0e2: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_de936835b986b7e9a72b8706204dc183: Generated + col_105b287b6f42e3e08bccae5fa0bc1e57: Generated + col_4bf016b629fc04e08a3080d945fff2e3: Generated + col_10c0a78ec67f5765bb129e53d403a805: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table0a542ca892cb0eea27538d7360f718ec { + col_6a59e77ab0765a9b1e48a245087e5bbd: Generated + col_76b9a01c6151dd633f8055cde973a800: Generated + col_1d9d9279776c5549212200cb14336162: string + col_e78e90b28ac15ec4ffca85e98e8c9ba3: Generated + col_13715b2fa41756ef623ff3afe3ad7061: Generated + col_3886a084aa5ac96babd5443af176b2fa: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_ed9b82a66d24b12f15e6c804b8e2987a: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_1f6eddf77651742ff1d83404930b09ae: string + col_18f2a0599c2957ceab7b1d9810c178af: Generated + col_c5afa3714e1eb36f2ef051adb19d53a1: string + col_50169df6c46157b06e457a2215bafaa3: string + col_22b038c1818e66252d7965200369f7b8: string +} + +export interface Tableb8378493b92a26626ae5745222c8ba69 { + col_535325947cf44473a2c18fad07fe9457: number + col_2f76db193eac6ad0f152563313673ac9: Generated + col_62bd695be89e0f07c72268b40df9c2db: number + col_34e7aea5cf0f74ee76b3f5445a3ac1cf: Date + col_c84d2025f9e13529cf7b4aa05275bdf6: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_2700d8a25d8d8e80c4ad5b622ea5dbec: number + col_3d1ca4769fb6a0b43de8fd6c85704dde: number +} + +export interface Table565a308ecf3782bb5eb0197187361913 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_e78e7faf2c91332782285f057698f37f: string +} + +export interface Tablede86128413dcd68bd6d1ca009b6bae17 { + col_821c248ea5f31b36e1fef43cbcf38495: Generated + col_49a7abbdc564bf92a27c31a936047cda: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated +} + +export interface Table57dadc25e9a34c53f66b5cb499d75904 { + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_d141deef0d42e47261b99f7b286068d8: Generated + col_f35d7efe3efb3e67af82d59c734bf437: string +} + +export interface Table366c7f7bccaea5ff455a9b9265448ebf { + col_535325947cf44473a2c18fad07fe9457: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_2598a0c1aa229293b50e76e77b92ab0e: Generated + col_8f4a31364a65a9f539032a16e3f4ea8b: Generated + col_7a9cd04d755a1c1f269ce7184b943521: Generated + col_6ea44f04ea696f044e04871607c145ab: Generated + col_7426b7174c1b7d22061329a60b94e63f: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_e66275f52358e1042acff2dc629ecf3d: number + col_888ef26444026e2cf7e456521447a5cf: number + col_0169d667d30453fc6d348ede68c6137e: number + col_0191c0aa0d39de591b5236b304496123: number + col_ea32f0629d5780f0b84ac3c2dc29354c: number + col_83750383555947e4ccbd9661a0948ffe: number + col_ef1e84bf5d70755290854b1d0d60c91f: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_0511961bf51aa24c76ca49e18e4395e9: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Tablea4ca5018c98bd7912524f97ccd0a8757 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_e7e1b5558e643c883f256414a76e28f7: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_aeffdc77f4dde5fd265842bc848e92d1: number +} + +export interface Table402dd89f94d2a88ccdf049224dfc8700 { + col_535325947cf44473a2c18fad07fe9457: Generated + col_066a120fe3abe924fdd105d2073b3a64: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_2598a0c1aa229293b50e76e77b92ab0e: Generated + col_8f4a31364a65a9f539032a16e3f4ea8b: Generated + col_7a9cd04d755a1c1f269ce7184b943521: Generated + col_6ea44f04ea696f044e04871607c145ab: Generated + col_7426b7174c1b7d22061329a60b94e63f: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_e66275f52358e1042acff2dc629ecf3d: number + col_888ef26444026e2cf7e456521447a5cf: number + col_0169d667d30453fc6d348ede68c6137e: number + col_0191c0aa0d39de591b5236b304496123: number + col_ea32f0629d5780f0b84ac3c2dc29354c: number + col_83750383555947e4ccbd9661a0948ffe: number + col_ef1e84bf5d70755290854b1d0d60c91f: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_0511961bf51aa24c76ca49e18e4395e9: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Table92498a6babb7032cdcad6e43158a3359 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_e7e1b5558e643c883f256414a76e28f7: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_aeffdc77f4dde5fd265842bc848e92d1: number +} + +export interface Tablee90356817b37536144c4cf962e9e5165 { + col_b44e675732d485b4ded87fd63200ab77: number + col_21e3dbb834dd41bd22e04928fef6a335: number + id: Generated + col_756c412732c9e787f483d35d939b8ef2: string +} + +export interface Table61a79fc440f7ca2d4190d47ee809f66c { + col_2f76db193eac6ad0f152563313673ac9: Date + col_7364a488f431ca7296b76a34417395b4: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_2598a0c1aa229293b50e76e77b92ab0e: Generated + col_8f4a31364a65a9f539032a16e3f4ea8b: Generated + col_1690e4ca8c11ef9d61ca7213686d5c40: Generated + col_6ea44f04ea696f044e04871607c145ab: Generated + col_7426b7174c1b7d22061329a60b94e63f: Generated + col_d3dfe95339547ab875d57cd71ab15f81: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_e66275f52358e1042acff2dc629ecf3d: number + col_888ef26444026e2cf7e456521447a5cf: number + col_0169d667d30453fc6d348ede68c6137e: number + col_835294398c028add3afb4e1cb897a4de: number + col_0191c0aa0d39de591b5236b304496123: number + col_ea32f0629d5780f0b84ac3c2dc29354c: number + col_83750383555947e4ccbd9661a0948ffe: number + col_ef1e84bf5d70755290854b1d0d60c91f: Generated + col_8b9c30bb3038e2306d0186e3b78f5f3a: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_0511961bf51aa24c76ca49e18e4395e9: Generated + col_0d15b3ba535af3fa98a18834ca71c71f: Generated + col_079842fe7e15f5de8a65e411c9df3787: Generated + col_0aff87eb8d3d48fa89e873060f0715d4: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Table7051320fedfb456818eb15cdf217186d { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_e7e1b5558e643c883f256414a76e28f7: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_aeffdc77f4dde5fd265842bc848e92d1: number +} + +export interface Table2d7cdf1ccac4544f81ac78a12d5fba7a { + col_caaf808b80e56775d03b800fc5edf429: number + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_369ce420bd39cdc51bfcfd33d861ba59: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_b1dc1e3377a082304d817664243e7b17: Decimal +} + +export interface Tablea8e3bfebcd001eac1185867f7dec94a5 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_910c87c70d93d69a64538ffc358a99de: Generated +} + +export interface Table148ce21c70970d2809c4028c229445be { + col_f4dffeda79e0ee34f16d57241b615f53: Generated + col_b738ecc416fa96f41459da0404cdbf50: Generated + col_44381c5d8d2d9361dd21bb7a7facf4b0: Generated + col_0259f6499a0cb3f370a6119054eea3f3: Generated + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_fe3144cfd0702470a18811a50b2a773a: Generated + col_8ce24ccf64416ee4c1737bf1ab0ea2f8: Generated + col_4f1b7b2483b9bb0a8b355ef69f09d65e: string + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4a2d849a39589cdab1bef664bbaf662f: Generated + col_5306bd08c84506786847c551137592aa: Generated + col_f901883e4b25324963cbb061fed4eaec: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_bb8f173dd39e2bbd2ca8bb502bdd5d7e: number + col_645e3472df388d4789ad6a12715cc7a9: Generated + col_eade66be3d5c19459dbb52d65e58a9ff: Generated + col_78f5ba4e82866b7d30d1c63b058b5042: Generated + col_ed68df9dcbc6be1e74aa52f2aaac27b3: Generated + col_a222f017034f971d4a5004b53f0e9699: Generated + col_9b0c62311c53c898ce6699696d685a14: Generated + col_a19773e01d56a8727f9b50bfd98b67a7: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_0c7beee8ee787fec23562efa3adbf18a: number + col_2a5b75864f31fbe839a8f028ee554f53: Generated + col_78729121eb966294e69d86f8b656c99d: Generated + col_cac71ab1db07fe38f5915b92b9959348: Generated + col_6310539ac8c0b13a896e8b9634e1e0c8: Generated + col_1628a3796456964796ddec0bcb38d0e5: Generated + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + col_d9d6c97f041fe7c54b65501f67fcfea9: Generated + col_bbeb11288ba33af45a8a7251cb87da2c: Generated + col_e199cc093d54f6c562ad8d547976c5df: Generated + col_e26de993b80283e73a98d2f5a7655e44: Generated + col_7a9cd04d755a1c1f269ce7184b943521: Generated + col_7426b7174c1b7d22061329a60b94e63f: number + col_1cc17f0951cd6972739a3cf858f985e2: Generated + col_0364c29fe7237f4f6ffba597544b4f46: Generated + id: Generated + col_3f38469c48f069fcc4f623bca8c587f6: Generated + col_d6ffe41368d46575efb6f237e05643f8: Generated + col_478cb1787a1e2a0d75235f14a78b7929: Generated + col_387852799fd39a75bb0ffbb3a088106e: Generated + col_ea14b84c81e7ebecb1faf4ce83b8826b: number + col_4002e95484dd522e663c6fac8757d914: Generated + col_01b47914fe373f6ade80d5d3afef6847: Generated + col_a3c438c6f272e35cd2f6e1a4f59dec67: Generated + col_ef8a0d1ea2ae246640e55a5f585324f4: Generated + col_256cd843e152753550cd6aa845f56fd8: Generated + col_6360ba5916d4e8415f464336177c02e7: Generated + col_5410929b23ebb3020d600feea427cdb7: Generated + col_2924351c3f723a33dfd4dc659a06be9c: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_83ca342b1dd50c4c7999010b9ad6683a: Generated + col_43c33f96a8b44d501f45cd6b9382f9df: Generated + col_7b4b1dd4aafa937e34cb562a048e4fbb: number + col_0191c0aa0d39de591b5236b304496123: number + col_3ad5d52faa1934f2661f8a9d39c48bcf: Generated + col_2baa55cecfe99708f15031b74cdd7d36: Generated + col_9e2f281c14fe1c305bf0613edb1b5467: Generated + col_cb9ad148d424c04f44d3959334b394d9: Generated + col_5c63e943a6e825630ccaefcbed7a719b: number + col_641b931cd172a7b80d81f8e994faed0f: Generated + col_83750383555947e4ccbd9661a0948ffe: number + col_32fae7a6a5f2cd2d02cbdfac22bb3aee: Generated + col_02f2a2f220f28476f9c5ae7f0edfc060: Generated + col_6052d6d42f76bc5ee164f458689e7274: Generated + col_1044fcff754bb0008ba077f4fdc005f4: Generated + col_bcbc405c655f95f2343eb1fb3288a05b: Generated + col_9e3a10e7f5449c1de35f219e8d4a0b43: Generated + col_aeffdc77f4dde5fd265842bc848e92d1: number + col_870d427af1d948c352eea11ffd952d1d: number + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_8ccb00b1ec3203ead93c89b315af7cfa: string + col_8b5da04bf1aacd462ab37eec2f0dea98: string + col_a0714fe92c4ddead9939c0f656a43ba8: Generated + col_7d39847d54a6fc52735c6a250cfce5eb: Generated + col_0db72b58ea6b0b1a2468f44c3a154621: Generated + col_75afa9f93f59b9a0da5fc050cf61454d: Generated + col_3b24e1adfd3713e88eb334dd342f072b: Generated + col_8c36708787079d53e4bb54ddc6d4cc93: Generated + col_910c87c70d93d69a64538ffc358a99de: number + col_53a208b112254787b9ebe57338d2e92a: Generated + col_4ab5b1dd04a8cefd62107890b80103cd: Generated + col_6dbc88c5b052629e050a099e04d7be3f: Generated + col_f1f2f079861a9877106a6209fe34974d: Generated + col_972aaa3fbd7b8c3cb772ed1eb78becbb: Generated + col_fb70e10e97efd8bc28a6c9cb1e9f9ff8: Generated + col_b96e29426fd3636dd5bc9ce5b03a13df: Generated + col_5f544d6483d4ce30cf3145abb40f9441: Generated + col_bab5d43498aec1209e8ab958b766cb86: Generated + col_416bce439c6a2ac5ac9dbd1b0947e48a: Generated + col_079842fe7e15f5de8a65e411c9df3787: Generated + col_0aff87eb8d3d48fa89e873060f0715d4: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number + col_1e36674b6a9b366e7ac7dc0343291399: 'auto' | 'validado' + col_e7f37cd2de5c3de049e6ef13e7027769: 'auto' | 'validado' + col_2923af0fb0193af631f34d210c0247df: Generated + col_df82ddd36c8d6387edc8c1d15e9e6e8d: Generated + col_f990fa06e3da84de9a61af49e4b7957f: Generated +} + +export interface Tablef650c769203b8bd7eed5a8b7e249c0a5 { + col_a538a4b49163b8abcdcff07958d6290c: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_7db3960deab1cd20d8b5b1f5501f3987: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1ba1f915f54c8d29d5766cc9b0efe0f2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table8b9070a970ee019dd472ce6c4a08418b { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_3924f75e4f7e65a64d2f06bad0a8da28: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tabled580c05f239408ff0392e235078a0ac9 { + col_a4513edcdb71f8647001257ec32ab4e1: string + col_2404b63b8a201d13a8735e0fa9b53478: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_1df5ee28c9955544f2ebe06a6c829b57: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_18697449d7c48cf32cdd4f14857e68ee: string + col_8368a8c92f592e349b57fc53fe6f98f4: Generated + col_f57dbda547fc6e900a0f8a585ddd9b49: string + col_910c87c70d93d69a64538ffc358a99de: Generated + col_a94fa2fac7c75e7343d9de23fa2ee836: number +} + +export interface Tabledd7d780df70068dcb36a8d8b86bd5298 { + col_a4c065a7262f640f0ac2b61885f9671c: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_b4226c098cbf79023e9a779b83ccd3c9: string + col_8a6902c3de19dedef52742ed22cff3ca: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_6177dfccf6065b1ec558e457a24dea33: string + col_aeffdc77f4dde5fd265842bc848e92d1: number + col_b1bac0f8e81aa2bc396eb0eacaf93f7d: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table48df920caa8cc60fd47820e9d94ea940 { + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_216979ad27e40ff49f5d477cb3ebad3c: string + col_1430120f960285493d5121f4e9f1d924: string +} + +export interface Table9bb0301f7ca02953fac2add8dcd7630c { + col_1d726898491fbca9a8dac855d2be1be8: Generated + col_d109701b76ff710c8e7fddd648466bac: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4f84013a8b5e4c2b7529058c8fafcaa8: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_8b5da04bf1aacd462ab37eec2f0dea98: Generated +} + +export interface Table5492e76278a71210d7231f4bf905ec2f { + col_6a59e77ab0765a9b1e48a245087e5bbd: Generated + col_fa769b4ad2c48f942621b456579a2224: Generated + col_0e26753c5fe14eae84568b5a83e79ded: Generated + col_08b4d026d42ae768f63552c6de119d71: Generated + col_60f7d4dabf428b3a6d7d624e3e8f92ef: Generated + col_05f720d878e84cf5edf8810ac56f2f47: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_e3c09cb3d68235ebdf5820c49f6ef2e0: Generated + col_e8597efec888f22158cf26c4a354b45e: Generated + col_c68408fb5945c7ed27cfe1fb9ac4c2ea: Generated<'afecta' | 'exenta'> + col_151fd0d998f5df50fcc7d39143f704be: + | 'acepta' + | 'agilice' + | 'bsale' + | 'iconstruye' + | 'mipyme' + | 'nubox' + | 'otro' + | 'simpledte' + col_99a8177c44470ec20b0097b78d30d2ab: number + col_99f35f96dabaa98303aaa135bfdc0404: Date + col_a4ce5705c5f18b69e4add952a187bdde: Date + col_c613b7206854402371564704dbd689db: Generated + col_355ea60efdcf57aa297299ab210b4e7d: Generated + col_b2272775d9787c60c9479000c8b8088a: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_a766059eaf3814aa9e73448453e9270c: Generated + col_aba4dc94d2f01540b5dbb57d1096c59b: Date + col_7dab8a0fad43f3c1c0c352252aac807f: Generated + col_98d8d6a239ae64c6f2fc402b7a7847d8: Generated + col_9f7b242c1ab922eb24d0a3ae403e9676: Generated + col_d5a21723ffc4d83c5ab428a5878324b9: string + col_15deb4ee2f0424b3885142c477ba88b9: string + col_042f170682938c181254695986457b1b: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_f639c93a74ec468c5609505b10e90eea: Generated + col_ba39ea3526b3c7a1ab364b9298d40d78: Generated + col_ad014db14bea88133e71209061b6bd74: Generated + col_90e4c91b2d55ab42c9930ec06e506ee4: Generated + col_d420d89b7ce762fa312a4437bccb99c6: number + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_e245eb517472187d10441eca2c4a9aeb: Generated + col_651324890c5c5b8c2193ad39bfa36c05: string + col_164b7896ec8e770207febe0812c5f052: Generated + col_40772ba813d97356c66a42e44c29f2f2: Generated + col_4e893eedef52baaf8f70770064c00f91: Generated + col_1d958835f7ab52daf74459d71c0c66d1: Generated + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_91d2a3cd2d79ad40574b4c2ec58584c1: Generated + col_e85a2e013135b7b178241e6fc32327a8: Generated + col_8b5da04bf1aacd462ab37eec2f0dea98: string + col_cb72fdda441d8ab0ee9b88e25961fd83: Generated + col_f9dd44edd9eab46a126cfec00a028907: Generated + col_7c2b7d5981088f354990946bb421e222: string + col_70b0729c3bbf27533b98759ae98fb40e: Generated +} + +export interface Tableea8e45026529937b0cecd544d8801cfd { + col_bdaef2864913fee6a3be8029d46830a6: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_2414ddf934cafab5eb8e6fbe3478710e: string +} + +export interface Table574ff9acd571619424cd55716f5f1dfb { + col_95a573b127ca2c23a2ed1dbc7d03d29e: string + id: Generated +} + +export interface Tablea79aeca54482635868f02356a51fa369 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablee7a44a84d410fa64377504e3aa7f72b6 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_99a8177c44470ec20b0097b78d30d2ab: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tabledcc9250fc52d5fbc25a56cf9c4089073 { + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_95a573b127ca2c23a2ed1dbc7d03d29e: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string +} + +export interface Table4d82bf6c52ed1355768c73593994c5c2 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated +} + +export interface Table73f359bc2658d254af39135aed8c3bf2 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_4377992db876783f2aced4af1b7cc195: number +} + +export interface Table8cf85c63dc3200ef8145fc0344d00f16 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated +} + +export interface Table401ef7ed8ddaa97932ede0de0b157c04 { + col_95a573b127ca2c23a2ed1dbc7d03d29e: string + id: Generated +} + +export interface Table3e875ede7feab48a89082e0c87c364f0 { + col_d08c3aaad1d4c926a4bf283098fcc325: string + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_d141deef0d42e47261b99f7b286068d8: Generated +} + +export interface Table7822bcc86140bf34bc6cdacbd734c0ef { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_a15701e29e0d577f5252d616c1f13273: number + col_e6c19fe14ec531d7b295d1723a4b8e03: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_72f96160fd66ba04a6c4d17116faca2a: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_6eabf912118c656e74717bf86ec69f73: number + col_b2211a70f2ff7369336027ed47f18f7f: Generated + col_923c1ce4be0acf2cf56890bbd41ec804: Generated +} + +export interface Table459dc31349051f20a755552adaf60c81 { + col_460c9eed028ead37612e14da1dd10330: number + col_2f76db193eac6ad0f152563313673ac9: Generated + col_6c5493e52a59d7de52511ba52276ddcd: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_112f837ef3cfed0e17742e284a1769e7: Generated +} + +export interface Table1b8610f190607dfbdafa9c71f72acd43 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_fb697b0790ebaa204d9bffad490998af: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date +} + +export interface Table1edc1b921ba66176c3ec62961c248f78 { + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table9b72afad4afd63d81ab6ef56c926765d { + col_fc00b65a31d011aa9c5cac6511de984e: Generated + col_4f1b7b2483b9bb0a8b355ef69f09d65e: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number + col_756c412732c9e787f483d35d939b8ef2: Generated +} + +export interface Table309e0b9a80a4ad911a672f7174429e35 { + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated +} + +export interface Tablea0eb46b195e5cbd5e85384a9a1622c14 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_eeec804da0fd1aeeb188a033dc67b8a2: Generated + col_a2485bfd6e0a49a04be5fbb9ed0123e9: Generated + col_76ef16690bb4ed0aba9768175f242b63: Generated + col_1e23790fd5accaa0afa87349f9791709: Generated + col_f0d54e8da1328799154329bc93eb4b55: string + col_f1f2f079861a9877106a6209fe34974d: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tableea5b8f9c56ff4ae4cb3c8f22541b33ba { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_1f7ca930a1d20b8732208df17a3f204a: Generated + col_74acc07e501e952b631264318b0a5ba9: Generated + id: Generated + col_c55b5208e65984aac86ada39165d9d62: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_df15c6be5f4fc31ef5a0a4fe0ae82481: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_aff776838092862d398b58e380901753: Generated +} + +export interface Table3a87f98012aa2362e8eb64ed4d9e8f65 { + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_0ba81706c32fe49f7691637abff566ac: Generated +} + +export interface Tablefe2e32091534caf00911fc7435cbc97b { + col_6a59e77ab0765a9b1e48a245087e5bbd: number + col_512820308ce62e853b7c389614ef5adb: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_57785655fe648f6c416a0d3024567b5e: number + id: Generated + col_805df4d52c1afca7f1fe90a63e932648: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_3326c052986bfda9670541e3279e2a4d: Generated +} + +export interface Table3cdcee0d77b622e8a2ec654a21270877 { + col_57785655fe648f6c416a0d3024567b5e: number + id: Generated + col_169ab89ce8908eabce9ec3b6c5350b3a: Generated + col_e82af1a7ad08756ecd516aef27dd0510: number + col_e245eb517472187d10441eca2c4a9aeb: number + col_e7fa32cb05ba9ddc8d5f75bdf1694790: Generated + col_ed735d6320ed39d39ecf94e63bcbbe78: Generated +} + +export interface Table8077f242ad5e05394a3dd81ce79565f7 { + col_90412006b8822d49b8306f1cebb4b244: Generated + col_57785655fe648f6c416a0d3024567b5e: number + id: Generated + col_3326c052986bfda9670541e3279e2a4d: Generated + col_40772ba813d97356c66a42e44c29f2f2: number +} + +export interface Table52a8644bfd17799495525f2fd8adc480 { + col_25cd93f430d277509b60d4390636895f: Generated + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_c8cdc4633fd519ba66ab3e84fdb9e5b3: Generated + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_eeec804da0fd1aeeb188a033dc67b8a2: string + col_a2485bfd6e0a49a04be5fbb9ed0123e9: Generated + col_53a208b112254787b9ebe57338d2e92a: Generated + col_0ba2161c945373e22c9989c68a51937c: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Table74bb684c41a71a06f561e10ffa4e3323 { + col_fc64eb6054f462d6d323dd7c2e2ff768: Decimal + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_f609bfdeed2c51dbb142fd03bddfd02a: Generated + col_5c63e943a6e825630ccaefcbed7a719b: Generated + col_83750383555947e4ccbd9661a0948ffe: Generated + col_b2211a70f2ff7369336027ed47f18f7f: Generated + col_6092393019ca918cd006522bd308d5e8: number +} + +export interface Table64ac7b9a171e9af222924b693d44887c { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablefd230cdd0c0d7bc04b06cffa3bc3fa3e { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_9f4a15cb3f14b10397b11f224b181199: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aff776838092862d398b58e380901753: Generated +} + +export interface Table2bf8003c7e2a7344f4d30c3a351926c5 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table5c1f23359d009924d75dac9200da99ab { + col_fee6d937834161cc73b3698fee871f5c: string + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_9b0c62311c53c898ce6699696d685a14: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_95a573b127ca2c23a2ed1dbc7d03d29e: string + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_25980343ed3b4c231a154e5e88396938: number + col_fb1ecce130681efa10fd55197773267d: number + col_d8ad55006c0efc8437cc487b5c5459f6: number + col_01abc2f9e295923216e8462e3a88bf5d: string + col_ea7e482493b72c75cf90057ba252352b: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_f8b0d195967998d8afabe1b39912ae34: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablea6cdaf7c2c1c27d8389fb8ec7831b240 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_c69fd88c6f0d5f2db866eaf69baa2554: string + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: Generated + col_00b4288b12a81b04c5f2479addcec521: Generated +} + +export interface Table618b14672aa41a4ddbaa07b4668e9ceb { + col_066a120fe3abe924fdd105d2073b3a64: number + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_7364a488f431ca7296b76a34417395b4: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_e842d3a41f6119b9ea97d9966c87fe4a: number + id: Generated + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_b2211a70f2ff7369336027ed47f18f7f: number +} + +export interface Tablee0ac1a12db533e45722bf75854c5f68f { + col_25cd93f430d277509b60d4390636895f: string + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_9b0c62311c53c898ce6699696d685a14: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_910c87c70d93d69a64538ffc358a99de: Generated< + 'F20' | 'F22' | 'F29' | 'F30' | 'F50' + > + col_91b6293c3ca6646fe348ce8a4f4b4c85: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table6b64130a9ac5e9179051a15684e76956 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_0f8a9471827ba9a9ddd4ce0e2ddd1a00: number + id: Generated + col_22bd050ad65b2aa12639b75318b0864b: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number +} + +export interface Tablec3c4b9ba46ff23ee52e9fa59ba4cbd42 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_38a15d7f839694e0cbb6b3feacd63ea8: number + id: Generated + col_22bd050ad65b2aa12639b75318b0864b: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number +} + +export interface Tableac8f964f7407177bed83d5a1b563c4be { + id: Generated + col_e245eb517472187d10441eca2c4a9aeb: number + col_91b6293c3ca6646fe348ce8a4f4b4c85: number + col_b1dc1e3377a082304d817664243e7b17: number +} + +export interface Table0e3703752e6fb26a7c95ffbf9ba62354 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table051ebef2507af0ef791ed665f9df9f69 { + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_20be803fa76256ebff5a3090a351dce6: Generated +} + +export interface Tablea85ed4b894e81fcae5b5f32832c0a4aa { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_2cf1ecc054fac526249f379db15f6114: number + col_d2508118d0d39e198d1129d87d692d59: Date +} + +export interface Tablef2e554fc6e599ca882cad3f9c8944c5f { + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_2cf1ecc054fac526249f379db15f6114: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_a086a44c8be387291cb7ec589a8d144c: number +} + +export interface Table92318b69e7164d55b1815a563a4f0fda { + col_f32428508672211d04f041977bc90510: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_89bd8e97120bfa5bcc0fdbcf4f96365b: Generated + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_ea3e5046a32b090e4e792bb30890a129: number + col_98d8d6a239ae64c6f2fc402b7a7847d8: Generated + col_c94ff636d78c16fd4972b7df1ed9f7f2: Generated + col_fe999c04c29b51909b8ec56ecfbabcb8: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_e245eb517472187d10441eca2c4a9aeb: number + col_20be803fa76256ebff5a3090a351dce6: Generated +} + +export interface Table11c3ad790c98516ecb794068e8fe4332 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_ed9174294dbcdc54c009c8087f24fd4e: number + id: Generated + col_c55b5208e65984aac86ada39165d9d62: number + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Table0b9fd044caf91b1c9c0decf463f48479 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_6c5493e52a59d7de52511ba52276ddcd: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_47800dcca216b1b165c13199d66c3b63: number + col_3d40d536360063946092d61d8fb4af97: Generated + id: Generated + col_c55b5208e65984aac86ada39165d9d62: number + col_fe999c04c29b51909b8ec56ecfbabcb8: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Tablecb5f0e2e2a6bb82fe0ec713f3001adae { + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table05f7a75fd9ce14b6ff3abafe6a0315cd { + col_f606ffbc02200e165ccbe5bd6e0ce11a: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_6137cde4893c59f76f005a8123d8e8e6: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_61ee96e36f87193202f69079c2a248fc: string + col_c010021498d7345dadc4ec5be041f8d2: Generated + col_9d73dfc1b706d61e28cf50df23ad34be: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_910c87c70d93d69a64538ffc358a99de: Generated + col_f136803ab9c241079ba0cc1b5d02ee77: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablef9d0cc88ca4af2fc064f9fe28c1cae51 { + col_258def64c72dae45f3e4c8516e2111f2: string + col_c50368ae5e839e9224eb0947f06fc605: number + col_26fc2a6aec4599af1b0a36cbe6e3939a: Generated + col_aed19f4c9c98622d6661990a56b5ad95: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_ca55f5b1d19aae0a019b8afb8d995ca9: string + col_f9c55d34dd1668d1fc4a576fc2f8c64b: string + id: Generated + col_d7cc8cbac63ee8761aabf7792b5160db: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_665cebec3ce1380ce4e3c90b1bedcbf5: Generated + col_76ef16690bb4ed0aba9768175f242b63: string +} + +export interface Tabledf515f554daadb410af199b9d2af4968 { + col_26fc2a6aec4599af1b0a36cbe6e3939a: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_665cebec3ce1380ce4e3c90b1bedcbf5: Generated +} + +export interface Tablee7013b1aa66ff80026b9594533e73417 { + col_0e9af2c1d8b2bdc39279709d960ee616: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_de2b14ae7499f90736fc4a92327553a5: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_55d0da66c8f6617ffc31f4d7e9b9cd6a: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table6fc94749b5f65b04e1364bc84a3b675a { + col_1019e8dbd935e7e1fbaee27cb45c81c5: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_1590c1c1103e53135f348374eda74d92: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_2cf1ecc054fac526249f379db15f6114: Generated + col_2c0609d963e4d588c6b53d93845d6661: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_74af50ad445ae874663c514314c04397: number + col_a1625f77580ae88538a0bba96298b5ba: number + col_36e816a9244e63bedbd7bac69c3208ca: number + col_3a4c1cab8214c2a1f85432d018ac0548: number +} + +export interface Table7e5a6e895e47f444ce7042734df8ce92 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table03fcd39a79bd9fbbc8f2f32371eb6a9b { + col_7844a93ad4b97169834dade975b5beff: string + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table3edc0e801929e10d8dd381561aa2bd31 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_e8597efec888f22158cf26c4a354b45e: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Table75f7cd025a872d2698d2a6e53a8cd953 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated +} + +export interface Table075f9410d29eaec83d4f68c3dfa82a10 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_2fd6a67502ba2fc6e63b23903522d93b: number + col_aaff2deb17374d1ac30c040f6f0552b5: Generated + col_2931dbf568c51f5a95e2e3081491a702: string + col_3bf01fe7a9112bfabe3af0e2afea3e59: string + col_f7b98604d9635076cd6f4dd654792206: string +} + +export interface Tableb91d0a254d43344084dc0efd98b90946 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_95a573b127ca2c23a2ed1dbc7d03d29e: 'activada' | 'desactivada' + id: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Table4d4605d2d071f927c338880fcda7b540 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_88e292b9447efefa8460bb2b17d043c0: Generated + col_ee681610cf80275688440d62a3060f1d: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table14a5541144254091c320909a95c4c614 { + col_484a106f0719881cf489e0fbd80bfc43: Generated + col_c9774140535fe111b94e064a8c420b98: Generated + col_662faa62e8249d797277f109de5dbfc2: Date + col_141e21b657ebc0212411bf8df49a57cf: Date + col_ce3cb2352c9bc7bfe791dc286b11e4c3: Generated + col_d8e32557636967bba571034b4660818b: Generated + col_5d2dad9c812862769b4a934b13695d02: Generated + col_9b93b26c60773f04b795b6accea9014e: Generated + col_a1cad862e5cc1c937323caa84259cefb: Generated + col_e413d6c84d788644dfbcf3bf6fefaabd: Generated + col_4a375049db156d117c5ad35214dfe424: number + col_e6a4dce7716be656ec5e052771f82d7d: Generated + col_62b99d59be819ae40b4b89dc38d01b6b: Generated + col_c053226db4df10c61509baef89a07cf2: Generated + col_f9338a582beb27844ddff5a2491b29d3: Generated + col_d3e721d3f9c12db0276ec46a3921d52b: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d86bec40de826529ed04c5d5bc0f975e: 'historica' | 'provisoria' +} + +export interface Tableb16695c526d6fa5e20b329d5eabfd364 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_2257daef930a33efc1b422d4f3d41890: string + col_a7743b12384fd798fdad7bff9e75bee3: Date + id: number + col_f136803ab9c241079ba0cc1b5d02ee77: string + col_00b4288b12a81b04c5f2479addcec521: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table9eb67e79e0e2abbb0a295904fd81d805 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_84267f80102ea16f25ffe6f5be92255e: number + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablea700a17706246884b5a04cafcebeaa55 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_7426b7174c1b7d22061329a60b94e63f: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_249c850f62ea50feb918b095fc56d763: Generated + col_910c87c70d93d69a64538ffc358a99de: number +} + +export interface Table6a853060686c878e7535e29bc3772d73 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_2a5b75864f31fbe839a8f028ee554f53: number + col_7426b7174c1b7d22061329a60b94e63f: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_6177dfccf6065b1ec558e457a24dea33: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_910c87c70d93d69a64538ffc358a99de: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated +} + +export interface Table2c1e8df56b265a10929de25e4593033b { + col_2f76db193eac6ad0f152563313673ac9: Date + col_973428953d32ee6d05ce5873c2f6c139: number + id: Generated + col_2228c8ff8da091a3ba7fe63f7bf0d58f: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table3c8b015b7697cce06653b215afc8acd5 { + col_3886a084aa5ac96babd5443af176b2fa: number + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablef058a40da08114d390fcea4b81b4f0a8 { + col_cd0e40950118e419d8215d52940c0b52: string + col_2f76db193eac6ad0f152563313673ac9: Date + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablea6a7b2d92feb037592b7ed49c34d1e54 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated +} + +export interface Table4aba31682ab92f6f2baae3f68f9dc1ad { + col_17472f76c85ecf1c942560d9cf5511ba: Generated + id: Generated + col_68df1b4eeab1a558d607590173e97fbf: number + col_bfd8f7ddc31266f25afd1b6ea43d8750: Generated + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_e7fa32cb05ba9ddc8d5f75bdf1694790: Generated + col_9b1db7c4b5f517844f202bf7ffc3bc5a: Generated + col_b53dab55eaeda66574268ffea2dd4da0: Generated + col_0e46a6ad6b83de719c1b5b777e48c8c5: string + col_62f5fcc9ea1e44509eaecb6e081a39a1: string +} + +export interface Table75d4ed2c1cedc7a0f7e36059177a8837 { + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablec3ba8dac5adcbeb93ed2dd458b6ad4a1 { + col_4ea20fbed0c11321d0d5e8c50873ad43: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablee53ad4b421c58913d023a3296c13419e { + col_61949c8545b648ea08e9494e262449b0: number + id: Generated + col_d2a00107fe464a6f02f9c6d81c6921f0: string + col_71eeffd42498c613691768b775cbf251: Generated + col_f88bdb43cdad67e0a8f355a543132f62: string + col_5e1fe85ed4421393b4f7a7f36d69f6fc: string + col_b1dc1e3377a082304d817664243e7b17: number +} + +export interface Table980786dce470ebfd2621534ebcd5e6e9 { + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_f88bdb43cdad67e0a8f355a543132f62: string + col_b1dc1e3377a082304d817664243e7b17: number +} + +export interface Table1a270e99026f39aaf8e33546e1c2c39e { + col_47aba655fea8599b302f71d06d0bab66: Generated + col_fc64eb6054f462d6d323dd7c2e2ff768: number + col_066a120fe3abe924fdd105d2073b3a64: number + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_bb8f173dd39e2bbd2ca8bb502bdd5d7e: number + col_edc2332d18c4df92bd6c29a42e54c63c: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_6ded30065c525d1945f38fc1b77df3fb: Generated + col_f88bdb43cdad67e0a8f355a543132f62: 'CLP' | 'UF' | 'USD' + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_3924f75e4f7e65a64d2f06bad0a8da28: number + col_885fa91590a5518eb66fcca9a6f11849: Generated + col_9eed1c8dafecf36e8f11783f0f9ee8d3: number + col_b2211a70f2ff7369336027ed47f18f7f: number + col_83d043db4fdfe6882fb7f01a09d92b11: Date + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number + col_4856cff2db9bf179e997e2f57c61c649: Generated +} + +export interface Table380b3be3b993931074af40f4e0af76f3 { + col_08de056b6d3139a95d0aaf99f8e3c52e: number + col_a538a4b49163b8abcdcff07958d6290c: Generated + col_d87b10b303465ebc76c15dccc5cb2b83: Generated + col_ed49a01549ef9030b8a17635d2c0d411: number + col_6d210c02b9f9e0fd7c6bb98e4b23d240: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_d7f9c190010492e516de3eebbcf3bfdc: string + col_d8f6edda3ad9cc2d89df66f5b6df3e25: Generated + col_221bd929021f3685ea46aaa5369685fc: Generated + col_15af44699327f9a6bb2f12da27fdf0ce: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_22b7922d2402e25805b18c7fa98d093c: Date + col_633cdd5118945d8664ed78acc276604f: Date + id: Generated + col_4a1aa938bcb545cd35f50b5fb8b8851f: Generated + col_ea14b84c81e7ebecb1faf4ce83b8826b: Generated + col_5bff9cec94f5ab89567a1d0a24c1bfa9: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: Generated + col_46e6bd185eb3c01ad5692d9ab01733b8: number + col_e66275f52358e1042acff2dc629ecf3d: Generated + col_ac23115c19aea6a256fe04d9a8b6b6fb: Generated + col_0191c0aa0d39de591b5236b304496123: Generated + col_68dcfd901c5f8c7d467fdf74b4ac45ac: Generated + col_d8ad55006c0efc8437cc487b5c5459f6: Generated + col_207b11ca5edb8c143e5afe1712ecbb6e: number + col_8476076b3459ded88a2a4a1863b65a17: Generated + col_1b6b0183f1a79f6d53cc5f8bd5f315d7: Generated + col_7b7ed03cfd1bca988b56026735632df9: Generated + col_ff66cc4c53cea80f652f8e4aa9d4ce6b: Generated + col_6b5cc62667cadeeda2fa4f4be845e772: Generated + col_dc449cf2403d7e1681944d9f4529b394: Generated + col_b96e29426fd3636dd5bc9ce5b03a13df: string + col_195367e97caee2b9ed726514b7a38efc: string +} + +export interface Table4a03b332b99d0dab4e359b9b2e9132f3 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tableb690efdc73ab53d741824e87ddf41a0a { + col_066a120fe3abe924fdd105d2073b3a64: number + col_4f1b7b2483b9bb0a8b355ef69f09d65e: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_8f4a31364a65a9f539032a16e3f4ea8b: Date + col_7a9cd04d755a1c1f269ce7184b943521: Date + col_7426b7174c1b7d22061329a60b94e63f: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_ea32f0629d5780f0b84ac3c2dc29354c: number + col_83750383555947e4ccbd9661a0948ffe: number + col_53a208b112254787b9ebe57338d2e92a: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table80586ee503601f161507ee3f207fa19a { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table138bb88f13d65a10a42882c2578d7839 { + col_90ac24349411e6954fc47a05040d032c: Generated + col_a538a4b49163b8abcdcff07958d6290c: Generated + col_9dd1bc5c639dd9f27a30853ccf20cf02: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_62bd695be89e0f07c72268b40df9c2db: number + col_f514791973dfe8ce52d05f653fff009e: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_973428953d32ee6d05ce5873c2f6c139: number + col_74050a371c9d77e377772310c43bb55d: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: Generated + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_48a86579578d404ad2da71aa0b2b99f4: Generated + col_f61843551e5d8934a2b3afa31e66a5d0: Generated + col_a48faef66299d05e03534b08993a3c80: Generated + col_84169a44f95f5e872347716abd594909: number + col_ada72f8f1643e5c694dbf2a5636f1a64: string +} + +export interface Tablef8ad778cddf738c853992b7f5446b4f1 { + col_25cd93f430d277509b60d4390636895f: string + col_82a9e3b076bbedd5c288e8b1364c000d: Generated + col_ebd1ae5512e18049f0c867b187ad74b7: number + col_c43595b745f255b38d7a1da6a7b6d5aa: number + col_066a120fe3abe924fdd105d2073b3a64: Generated + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_c1beb04a7642970cf4e59164d0b162ab: Decimal + col_a222f017034f971d4a5004b53f0e9699: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_2a5b75864f31fbe839a8f028ee554f53: Generated + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_d9d6c97f041fe7c54b65501f67fcfea9: Generated + col_1690e4ca8c11ef9d61ca7213686d5c40: Date + col_7426b7174c1b7d22061329a60b94e63f: number + col_0fcee78e15438d90e5191b85092b83bf: Generated + id: Generated + col_ea14b84c81e7ebecb1faf4ce83b8826b: number + col_7f2eeb75f4d42d42268e3dcf985ea311: number + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_5c63e943a6e825630ccaefcbed7a719b: Decimal + col_9c345463e1fec644c6eee8e6158d953f: Generated + col_d69c485b8a1572710f1a3736bd1ac46c: string + col_99454795142dc6752632d6afc35ccb31: string + col_885fa91590a5518eb66fcca9a6f11849: Generated + col_b6492f8aa398e19ecf4295c9aaf0e72c: string + col_08970091b0d2ad51d515d8a311e9acae: number + col_31f22cda5030a6e16556c8d64f4d229a: number + col_eb4b47c599bd30509bef47d1ea3a29e0: Decimal + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table9f6e2daac23f8ae268d4557cb47cb202 { + col_5a1d3fcf6b0964812cb1d9ac632408d6: Generated + col_d9a3bd4bbae376e6fe20396874ab1f84: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_79bb38e8889d83eccbfe56dcb56f7c05: Generated + col_1690e4ca8c11ef9d61ca7213686d5c40: Generated + id: Generated + col_817f7773b53a20deae52a267974f26be: Generated + col_678f2cb7abb9b9f59779889d38a6522e: Generated + col_d0fa5f84c5a77f9a1cef6148c1a10afe: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: Generated + col_40772ba813d97356c66a42e44c29f2f2: number + col_3a5ccab1310685a8dc5a8ecf5d187e56: Generated + col_f136803ab9c241079ba0cc1b5d02ee77: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table7ff09e5ace1dbf00f39b6358c5aa3817 { + col_1d726898491fbca9a8dac855d2be1be8: Generated + id: Generated + col_3cd6b216e8b82554eaa2f6c45b0a3c14: string + col_29b35b7caf7d5ae4d43b9b80ca0f9187: string + col_efcaf7b2db6ef497a009d28351e75abe: number + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table3527de031c6623c0eba6355dcdd45a6b { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_52acd46049d4e8c9c8596637256408f5: number + col_65a3660424a0ab0c1ef22059940bd5e8: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_98c9253c0973d0e076532038838b0ad9: number + col_a0108f4039ad5ef8af15629186ff5d13: number + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: Generated + col_0268179270db272c8d70e400380d7c05: number +} + +export interface Table09612d694974820d8807b91ecde8f26e { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5d4dc010ae24f1dadd43aa67593d0f7c: number +} + +export interface Table38195ba8de22a862c0f40f70ebec25bb { + col_36c8e89b7e4cfc448f69c971486cb123: number + col_4f1b7b2483b9bb0a8b355ef69f09d65e: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_34e7aea5cf0f74ee76b3f5445a3ac1cf: Date + col_c84d2025f9e13529cf7b4aa05275bdf6: Date + id: Generated + col_97ec9689eca8dace826b37d2ed59250b: number + col_3f9be60473c4a309579563a7358c92f8: number + col_83d043db4fdfe6882fb7f01a09d92b11: Date + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table93037210a648b88105c5ee2473337821 { + col_46df0ccd51bb26538db287f8e4e6e4dd: Generated + col_f32428508672211d04f041977bc90510: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_e245eb517472187d10441eca2c4a9aeb: number + col_4bf016b629fc04e08a3080d945fff2e3: number +} + +export interface Table0b5857bb9e98480275f017b7af173e3f { + col_72f96160fd66ba04a6c4d17116faca2a: number + id: Generated + col_6eabf912118c656e74717bf86ec69f73: number + col_32a8fa725b782b014f4fff3183a2de16: number + col_4289648e222b26e875a681db53d46c71: number + col_923c1ce4be0acf2cf56890bbd41ec804: Generated +} + +export interface Tablef27ebdbd2754995818491c1018692ce5 { + col_1d726898491fbca9a8dac855d2be1be8: Generated + col_fe7105552b616f510178c40c861ba761: Generated + col_c5b4c43869f38cb5e5ca94ba8e823f70: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_b170288bf1f61b26a648358866f4d6c6: Generated + col_de2b14ae7499f90736fc4a92327553a5: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: Generated + col_2fcbb818ea112e40bf6f722d975e231b: Generated + col_1840e20d17569bbdcae6da23c2d4efa4: Generated + col_d538cbec9201a31573be8bf3b9e0e331: Generated + col_a29ab34fee08d552ceddc06095b0881c: Generated + id: Generated + col_84267f80102ea16f25ffe6f5be92255e: Generated + col_c55b5208e65984aac86ada39165d9d62: Generated + col_c2e6b054ac1da5187e54d089c9065cad: Generated + col_169ab89ce8908eabce9ec3b6c5350b3a: Generated + col_6fb9b267c35b1007e304854b2349ed7a: Generated + col_ff89eee0bc7c681adc9bc0c956a6e018: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_e245eb517472187d10441eca2c4a9aeb: number + col_d8b2388384ce4e4a14053e9e3c6defd0: Generated + col_6c2d1e1a5e7c824f93773960c28e09f0: Generated + col_4e3f97631a05a2833f3a08434a1677d1: Generated + col_b53dab55eaeda66574268ffea2dd4da0: Generated + col_502fd6332679b81831dba4f9517a555d: Generated + col_85b27642c10d4a6c72c3b6b4d02c8d4d: number + col_3b571dce50f96585528355c99d1c3479: Generated + col_1014c2beb9f5ef346656f1056d0885ed: Generated +} + +export interface Table6009b7b4db0ba922eead74b775f40f8c { + col_066a120fe3abe924fdd105d2073b3a64: number + col_aa0ae4d63455847b0b02a481f9f38ab7: number + id: Generated + col_b6492f8aa398e19ecf4295c9aaf0e72c: string +} + +export interface Tableb6b0fa946d389417c5c3f14aa8ff718a { + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_ca2f68c7e7befa1bb272d18ca7a4c73e: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table3edf238f7262a23abe0751a2ac0af6ff { + col_f32428508672211d04f041977bc90510: string + col_2f76db193eac6ad0f152563313673ac9: Generated + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_9de9baea781a4571ef4ec283c5bfba6a: Generated + col_4649c587e02b1a41f7eb4967032e10c3: Generated + id: Generated + col_6ded30065c525d1945f38fc1b77df3fb: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_885fa91590a5518eb66fcca9a6f11849: Generated + col_9eed1c8dafecf36e8f11783f0f9ee8d3: number + col_910c87c70d93d69a64538ffc358a99de: Generated< + 'Deducción' | 'Otros' | 'Percepción' | 'Producto' | 'Servicio' + > + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table55ac07dee59e4a2d00136b025cc01d9e { + col_f32428508672211d04f041977bc90510: string + col_2f76db193eac6ad0f152563313673ac9: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated +} + +export interface Table09e8ea41829a99131a2920761d339204 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_dcd12b62e76b17d69e313b8897f4f7ea: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_6ded30065c525d1945f38fc1b77df3fb: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table7a616917b50007f39137fa41d2f51ab3 { + col_05f720d878e84cf5edf8810ac56f2f47: string + col_b599f327b0f1350c83e6466016f68dee: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_e3c09cb3d68235ebdf5820c49f6ef2e0: string + col_e714c1cd11c5b7d1de0c5f6e076020b4: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_3e68cb4bb944a2eb1873d121e2c1da9f: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated + col_032711695edadad1acb9974d043ec642: Generated + col_ef1e84bf5d70755290854b1d0d60c91f: string + col_8b5da04bf1aacd462ab37eec2f0dea98: Generated + col_c29343eaf65c23d827ee1a8df41c4c6d: Generated +} + +export interface Table5d8df59e64a9eeca85daebca610e21a7 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_7db3960deab1cd20d8b5b1f5501f3987: number + col_15cf093f2ffd2ac39ed7a55e9ff65d04: number + col_60145e143f1a86609b62f248f3001b9f: number + id: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table526124c9359353a7e56271d12d9fcf0c { + col_53ca581ab7a5aef5b659bc27c81d5d51: string + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_335290b198cde5bc8fcea40f61749ec1: Generated + col_f8356769c300813cfa84768123cbe45a: Generated + col_7426b7174c1b7d22061329a60b94e63f: string + col_33cee772b203aed80ee06d3dcb2cbcd0: number + col_4be00234d2a8d9d5271b91c49e484dc9: Generated + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_9f63df725d4f28c580e46c10f2df8a03: string +} + +export interface Table6bba2bdcbf233fb7649d1f614417da41 { + col_7844a93ad4b97169834dade975b5beff: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + col_8495897860c0b6e16a8d5c7a149d9d7f: Generated + col_1f6ae20514b228ff1f188515cde39b4e: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table390f512e2274731b2d168d8f19da171c { + col_2f76db193eac6ad0f152563313673ac9: Date + col_80ae6f72f9c170f9e1bcae48c1677802: number + col_5ba4f2b0c4324a2a400b0ae7224889c2: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_a67abae8eff833edb8b78a2ded44f0b3: Date + col_33cee772b203aed80ee06d3dcb2cbcd0: number + col_e9820863f3ff0a31be16598cc3058d78: Generated + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Table1899f801ed13e5910d18c6b08028d7bc { + col_030b50b01f2428db7db79395842e60de: Generated + col_2f76db193eac6ad0f152563313673ac9: Generated + col_7364a488f431ca7296b76a34417395b4: number + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_ec9fee4cc043466cd4926f8982fbc146: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_fb1ecce130681efa10fd55197773267d: number + col_2a8da7b65d4d1b4f0cd0a3160b6706db: Date + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table1082c28dec8a8ffd8ce641335442372f { + col_b0ad63f3936782807cb0b2b171280669: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_62bd695be89e0f07c72268b40df9c2db: number + col_c010021498d7345dadc4ec5be041f8d2: number + col_b7f9bf58bcb05c0cf59083ffb79e366b: Generated + col_7426b7174c1b7d22061329a60b94e63f: number + id: Generated + col_cd52da97b57b116541458d23792b0f11: number + col_1d119125897e514751e695fab638cf81: number +} + +export interface Table72909a5ac37995f967b619c9cafa07d6 { + col_d109701b76ff710c8e7fddd648466bac: string + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_8b5da04bf1aacd462ab37eec2f0dea98: string +} + +export interface Table81a2bed79d9365d1982e76dca5a676bd { + col_7d00e7af094c860f729814df43ab537d: number + col_2f76db193eac6ad0f152563313673ac9: Date + col_5ba4f2b0c4324a2a400b0ae7224889c2: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_33cee772b203aed80ee06d3dcb2cbcd0: number + col_e9820863f3ff0a31be16598cc3058d78: Generated + id: Generated + col_1cbcac9ade6914a00f55838acea44222: number + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_42efda2df902eef7402eecf653a5e144: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated + col_8a56730bf7a7298784c796e101f92d75: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table9b567a9f0bdf26ccd8202eff33ff637b { + col_6e6c2420ff71849263a56ddabc5a1731: string +} + +export interface Tablecb69558ad9c32a83ec1e61169d89de2f { + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string +} + +export interface Table69cb4926463c11065ab61382047dd490 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table3d90cba85411f05feed564dbcd2e6e55 { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aeffdc77f4dde5fd265842bc848e92d1: Generated + col_10c0a78ec67f5765bb129e53d403a805: number +} + +export interface Table32254855b1a9a81426acafd370a0edc3 { + col_53ca581ab7a5aef5b659bc27c81d5d51: string + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tableccc5e7a07cecf45f43c5c4efb6bbcd8a { + col_a538a4b49163b8abcdcff07958d6290c: number + col_6dc961f33219b65a0c2a9287c4565f24: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_c010021498d7345dadc4ec5be041f8d2: Generated + col_9d5c513c42957815f422347ca6268eae: Generated + col_33cee772b203aed80ee06d3dcb2cbcd0: number + id: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_145e62065965d2b6e7190139880f1bcb: string +} + +export interface Tablef9ce3585ff20a0b1dd731bdd34cf0ad9 { + col_2f76db193eac6ad0f152563313673ac9: Date + col_4c349d7184176bbf16b24181c7d83b03: number + col_697b738640d40c3284f56dfa8de48189: Date + col_1561c874fb6b23d0cb37194fe3d8f99c: Generated + id: Generated + col_6d2b226b7f4e0e1fbb6ec47efc9fee7a: Generated + col_9a115ebc25a0a303b3ffee1a7437146d: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_ded1e7d25d95c7702086a588883f1a40: number +} + +export interface Table1e275afc8276112b99cfc6f49842958c { + col_754b198717fa5cebdfd613f47444b7b4: Generated + col_86a5806c9362be2f139e52bcd5e35d54: Generated + col_6fbe4a892ea3ffb941c0ecf6176cb249: Generated + col_00970b22f199c1f1097c435cdd756efb: Generated + col_50c315b1fbd8484b7d31c7bbba602733: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_707742b6518f4d5b912446969bfc2288: Generated + col_314858149774214e5c87f0dc2de8a7e5: number +} + +export interface Table24139be0f90bb33600380f06b12b7f1e { + id: Generated + col_663662bf9e825d1b24e8262136d58845: Generated + col_eb6047359d3711dac3175270345f5c3b: string +} + +export interface Tablee0ce7ca1270b4541c302833574025ff0 { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_1c732b74da092461cf485a899f72089c: number + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_aff776838092862d398b58e380901753: Generated +} + +export interface Table129722fe7124ca893b45b3f11aa2797c { + col_f32428508672211d04f041977bc90510: string + col_c2673967f655e97fa0e3f979f0af8bc6: Generated + col_53ca581ab7a5aef5b659bc27c81d5d51: string + id: Generated + col_e245eb517472187d10441eca2c4a9aeb: Generated + col_2af39739cc4e3b5910c918468bb89828: Generated +} + +export interface Table361ca453b125de0694d45757ce574ac8 { + col_ed9174294dbcdc54c009c8087f24fd4e: number + id: Generated + col_0511961bf51aa24c76ca49e18e4395e9: number +} + +export interface Table682bfd8f39f1d3c2f141f8d1bfaba332 { + col_53ca581ab7a5aef5b659bc27c81d5d51: string + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_e245eb517472187d10441eca2c4a9aeb: number + col_acfd3b262b59e5fc131811193f9fc57f: Generated +} + +export interface Tablea4885bc4409d5d6aeca7a333deb32f36 { + id: Generated + col_910c87c70d93d69a64538ffc358a99de: string +} + +export interface Tabled0b3106159632181125a90621e656efe { + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablef8d58e2b9ad74400d9d3b73e1c56b24c { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table7f3edc307df1ebe46a26c3cdcce01825 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table4cb9cce2545216afbbe27fd7f598670d { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table075be2c4bc1569d9e2a0f43c706845cd { + id: Generated + col_146c07ef2479cedcd54c7c2af5cf3a80: string + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tableb0475c12dae1800e6f9bed0ecc74d8ac { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table9273711f2c37ed469c438c6e604205ad { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table674852753d920a7b8c85e3d7f0741d69 { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Table93fcd1b734496b580b42aff395ed8deb { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: string +} + +export interface Tablee8de821cfe0519477927d4aceb53aedb { + id: Generated + col_454ff479a3b5a9ef082d9be9ac02a6f4: Generated +} + +export interface Tabled97726553a6203a2e1fe24edf923c1bf { + col_2f76db193eac6ad0f152563313673ac9: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_72f96160fd66ba04a6c4d17116faca2a: number + col_7e53ed5979e336b304b1d25f30e1f246: Generated + id: Generated + col_024c93b9757242c6dd6b55cd2d0dd019: Generated + col_9c10dc3d09f0912a7e8dc3a34d7f4cd7: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table10a7b3d08bae6a280681dd4b1b4d03ea { + col_2f76db193eac6ad0f152563313673ac9: Date + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_b1dc1e3377a082304d817664243e7b17: Decimal +} + +export interface MyTable { + col_6f5e1903664b084bf6197f2b86849d5e: Generated + col_1d726898491fbca9a8dac855d2be1be8: number + col_aa4ec89520d642ef7dfed01d47c97c02: Generated + col_2e66a5c7e24d1d066230f368ce8b094e: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_4d742b2f247bec99b41a60acbebc149a: Generated + col_af4e225b70a9bbd83cc3bc0e7ef24cfa: Generated + col_4f84013a8b5e4c2b7529058c8fafcaa8: string + col_40e8a963a35b093731af6c3581d35bd2: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_454ff479a3b5a9ef082d9be9ac02a6f4: string + col_286755fad04869ca523320acce0dc6a4: Generated + col_164b7896ec8e770207febe0812c5f052: Generated + col_3917508388f24a50271f7088b657123c: string + col_6f7a0a5f582c69dd4c6be0a819e862cb: Generated +} + +export interface Table5e096b65e80874785e32076304380404 { + col_033f9699cf99d7dbb6abab6ddadb5984: Generated + col_2f76db193eac6ad0f152563313673ac9: Date + col_de2b14ae7499f90736fc4a92327553a5: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_9d73dfc1b706d61e28cf50df23ad34be: number + id: Generated + col_1cbcac9ade6914a00f55838acea44222: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number + col_83f7d7a27d3135c03186f950e68e1f50: Generated +} + +export interface Tablef3ed8107e22455983dfec1061f270c5b { + col_2f76db193eac6ad0f152563313673ac9: Generated + id: Generated + col_d2508118d0d39e198d1129d87d692d59: Generated + col_c5cfca6ce5a95940c658d8d972f0ba57: number + col_cb1fa9fed74f1879504442547a142c1d: string + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tablec051ae09c6cf6d7d3ea3732241b7ec9d { + col_5e0ed9fb00ecd0c6dd65a18eb7e113d1: Generated + id: Generated + col_d8549244769c9dc8a8cb8382a54feace: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table58d873381dd856073dc8af727f75a83c { + col_a538a4b49163b8abcdcff07958d6290c: number + col_066a120fe3abe924fdd105d2073b3a64: Generated + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_4f1b7b2483b9bb0a8b355ef69f09d65e: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_65412d203d0de8b88fb8688cc686a44e: string + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_6ded30065c525d1945f38fc1b77df3fb: Generated + col_d2508118d0d39e198d1129d87d692d59: Date + col_5607e33e4ae68a12af15c4fa9ada5c93: number + col_a7d0a8fb2a80ce50003c37428903c871: Generated + col_d721d91f1a957bbc273b111830ea9355: string + col_aedc0cb96fca54b979311e9caaf1345b: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Table2efbbc557d528fa0179d8200f20bd375 { + col_066a120fe3abe924fdd105d2073b3a64: Generated + col_08114ce1193bf6826c3277f27236a6d8: Generated + col_4f1b7b2483b9bb0a8b355ef69f09d65e: string + col_2f76db193eac6ad0f152563313673ac9: Date + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + col_7e53ed5979e336b304b1d25f30e1f246: Date + col_33cee772b203aed80ee06d3dcb2cbcd0: number + col_35ccfc3446d7aa0609cab70e86d2b448: Generated + id: Generated + col_9859f83dd80f56deebeb616b6b575ee3: Generated + col_1cbcac9ade6914a00f55838acea44222: Generated + col_6ded30065c525d1945f38fc1b77df3fb: Generated + col_b114935b452a2d927bd5ac81ad9a3d67: string + col_d2508118d0d39e198d1129d87d692d59: Date + col_fa367b08ef9acfa2b65fc6150dee916f: Generated + col_5607e33e4ae68a12af15c4fa9ada5c93: Generated + col_aedc0cb96fca54b979311e9caaf1345b: number + col_aa6b7c7a9c7a177e3f1ba452783eb63b: number +} + +export interface Tableb1c2cd01d00c7351140f576d84e64fc1 { + col_7e53ed5979e336b304b1d25f30e1f246: Date + id: Generated + col_fa367b08ef9acfa2b65fc6150dee916f: number + col_e245eb517472187d10441eca2c4a9aeb: Generated + col_b1dc1e3377a082304d817664243e7b17: Decimal +} + +export interface Table173d3cc6670ed190157f57b6fc5f789f { + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: Generated + col_6c58e53058059892b26b3562a7fafa9d: Generated +} + +export interface Tableea7fc406759eeeabe58177f5dc5b2749 { + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: Generated + col_6c58e53058059892b26b3562a7fafa9d: Generated +} + +export interface Table5d31333676303c399518c2fc4cf6ce6b { + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: Generated + col_6c58e53058059892b26b3562a7fafa9d: Generated +} + +export interface Table411a4da56c483124eeb78d27496b6bcc { + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: Generated + col_6c58e53058059892b26b3562a7fafa9d: Generated +} + +export interface Table90b86be76e1fe1dcbfeb23aac1268f60 { + col_80ae6f72f9c170f9e1bcae48c1677802: Generated + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_a7f4797b61012da3a9c1a8049c8a4974: Generated + col_6c58e53058059892b26b3562a7fafa9d: Generated +} + +export interface Tablead803551807f7dd640a7431281e60024 { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: Generated + id: Generated + col_0169d667d30453fc6d348ede68c6137e: Generated + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Tableacd9c0e145638abbf38c6c9982b5d978 { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_0169d667d30453fc6d348ede68c6137e: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Table03d5e3f6a5a1305f36b6f5e7b40f8607 { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_0169d667d30453fc6d348ede68c6137e: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Table1ad14a94caab8e7087a497085d7136ee { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_0169d667d30453fc6d348ede68c6137e: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Table13e2dfe71a6146bf0f7286309cee804f { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_0169d667d30453fc6d348ede68c6137e: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Tablec227d3e74b291218da01d96ad8e3cbf3 { + col_b44e675732d485b4ded87fd63200ab77: Generated + col_c010021498d7345dadc4ec5be041f8d2: number + id: Generated + col_0169d667d30453fc6d348ede68c6137e: number + col_2371c6548aea76f2e1ac529a3543b7b2: Generated + col_966c0adb6eb8c16d11aacb1b968763ed: Generated +} + +export interface Tabled861babbb2f5fa7cd7537704e5000a83 { + col_c010021498d7345dadc4ec5be041f8d2: Generated + col_739f751f517ccb895cb948a88ad78e43: Generated + col_1a1bd05bcd142859a62686952940e09e: Generated + col_b0da1cb2ad234bc279511b1fb66f6fbf: Generated + col_07b081464f537fa90b1de74e33d9f823: Generated + col_2b9cb9ef1a2977920c1ffd5df4bd4817: Generated + col_9d73dfc1b706d61e28cf50df23ad34be: Generated + col_b29a1ebd32df20c0b7928f43baa738ee: Generated + col_1aba85bbebef5ff4eee2f59cb2d9d7b0: Generated + col_0b683b909d42220ecd33ed3752ac705a: Generated + col_1e8e291fd8d42e9948004ae41f09dece: Generated + col_4241cfa1d3605ca1ae3b0559e88e1eb2: Generated + col_aa6b7c7a9c7a177e3f1ba452783eb63b: Generated + col_93fbfd598e9de1272e10942d7a5cb6ad: Generated + col_13a88bf9e5fc7bc33fd7d95a8bce65ba: Generated + col_484ada59e3bc5009053ee3de7238e81a: Generated +} + +export interface DB { + table_87d275947b3f2a646cd8ee94f591ef86: Table0ec723c3d4ee7229ffba2a11539b0129 + table_cc84d0da913ff5e201cd2498cd11bb90: Tablec67d8be002857dd3a70a2c4edaa4671a + table_49830d6d58c2b4f748ffc67b8b96d2ca: Table3face097074d5d4ea47610accdd3ffc1 + table_808edb85a0b912066126738aee81e217: Tableed617265d2d72c8e748ff8796bfa04c4 + table_53425a83056f97f81ebbed0e3a7c3de9: Table6dc0e4bf3b08bdf7391e5d833d1673d6 + table_736d84cc80e257dc78371b1eb0fb6b20: Table2f01d1d7b29ae047871b62964df1ecc3 + table_487e1ea19a552a812641fce4b25ca0e4: Table9f50dbe0b662b9cea0d016836eb72504 + table_a54c27458b6b5713e6fb731d2d54c2c4: Table4b8e90e811d962e132f9550bc90d5443 + table_ed9c00f680d2f0160414e2616694a04a: Table0ae6c699b7b44b166093c052150a0d36 + table_9996a55495fbffd1989dc4542469aaeb: Table2e45370c867ddf8f0ca7710b63dd2746 + table_426cfbb1cb47118dee5d9aeb9ebc9811: Table19f57540d944441abc6dcebc976adf96 + table_e5cf1dcc3993bf7c0ca2ce7e2f1260a5: Table1d1b84f13a74383d5b0324a011b609c6 + table_c5a8b59778733a9ed1ff55b76feb5aee: Table42dbaa8105cb92599360aa5169283403 + table_4f88999bf83d95515d96be5a0060a387: Table2f81c25612f8fefd026b753a1753974a + table_e0290dd8ecb360c47044a3a2a882dd6f: Tableded2bdb12664e58a26152ebb5fe676bb + table_2fec9061cff5d6a33870e59fcdb06c31: Table23e7a1e5ab953d2a85a5958458d0d824 + table_aae67cbd807d09b0d66e062e70f886dd: Table41bb6a93b802fe08f0b054ae835e2fe4 + table_d1bd6a4f6d21595e92f85d647b668e64: Table8be6c29eada2e2ef68bef0c9c1401a97 + table_8be60df8bd508aa3b21a02c30f2d540e: Tablee91e54a2c273ec3221b4d98ae8d79d12 + table_a489899852f5f4a4a8dd760a53cadf3f: Tablebb08e5d0fa8fd6089eeeb1ba950944a1 + table_157a3bc9c27097f32f4faeb89768cfb1: Tablecaf406ab258ff4b54413265206d55b45 + table_975382265709d29c3f2442e3bfb74935: Table90ffcbc2bfc57b68acac037b0aeae3d4 + table_ecaa5c884efb077761e66b71833b253a: Table1e2c9919a848fb2673ac28780aba041c + table_6c06b705ee850005c02ffbe38262ef25: Table1c765aad5af6c98fb0ef475fadda911b + table_1b322cd0c444c827dac7f30ae058a2be: Table4f240fba2b420e220c97e6e14c4819c6 + table_3ae4d1acdab97e1ef170f779f41ffcce: Tablec97e3cdd896ff553853d7817e4a866e2 + table_4a9207b1eeb4f40952b69f3479a48037: Table4974bbdf9d728fb538d7507cb9f84842 + table_610862f4ec87086144fc1485e6838505: Tablea3c8286fc7df926fbf05e09a03e2ac77 + table_fe1a1676504a5a83e3fbf40eec955a58: Table39bdacc8b55267ffc8bf75ff8ec564ce + table_9d71d7aaffb66d31bc2b9b42a8ff2edf: Table3d68aac4deb5f76aaffa0df8c01e305a + table_6c94f280d7ed171b4ae6f181c9731c34: Table90a64fc3cea5bc905374973771cafcd3 + table_d8dae30aa04afffe6c328708f46ec44d: Tablec479a580bb37024884d940eeacc9c4aa + table_9c3e72d53ff7007af15c6f696fb71812: Tablef7d7a7557d9db50bd40fe14bd830b9d4 + table_81985582f225312b575afc02878085dd: Table1d62a6c4a9763009cda042181b0c48af + table_aa3267f05fecf061f13699e786a51f9e: Table916f65bd1433290f26613ccd976c68a7 + table_11ede743d16afa28cc84bbeadfaa538b: Tabledb34593d7377d2007d44ba4b47dcec97 + table_af0437a4a6189de08d668a2d0ce97b54: Table309c66af6ff8ccb2dcf123e1af40c9c4 + table_98573ae89696f94f48a44b2b079b64f8: Table8921b63f9cb21e8293a8c1ddd9edc866 + table_7980538dcc93de25b4d83b4b3261ed3e: Table2037e68416ae40369fba0a939e7ac693 + table_6d3142ac2a560a1c5c32e699f81bf7ba: Table2b3f160083004c6c92a2ce1faf87067d + table_b37880f0bb08f83da5de92e1efa19943: Table5135075fea7b2d1c93603df216620907 + table_59aae399ad0526272d45ea6c030d0daf: Table5d4433ff31ef75511e70aa6e71495afe + table_6fbe4a892ea3ffb941c0ecf6176cb249: Table9e258b1708bd64e877d6cca1467dee66 + table_fd70d2cc35269b186dc738d8a6ba8324: Table4ed17d356988e97fe63e4b4e3b060917 + table_8d8d4b505b94c6f16ecea33984d5c60c: Tablea95d291bccf0be8becb18282bcbf93a9 + table_fe15a427dc1402f37002fb019dcb3607: Tablee12f5b7476cba16c3b1480cd551d2b42 + table_e36a272a216738299e30a9823c9b0502: Tablea6ca43be611a38117221fef4c761f97d + table_977e92e9417068febe7a1207f0ee014f: Tablef83eda9e66948a4da342fadf183e32c3 + table_5f9639fff5d140e880cfe248f297d49c: Tabledfc2f0e19fe1c0e8dd04191a3035bac8 + table_d5c1fdd37d3bf68fe20c43ca4520f7b8: Table93f030da0924f35ab2e57081dad1e2fb + table_03c2b698e69f760082f5d99cf50fc7cb: Table59fc5666d6be52faaeb255fb48a401ef + table_2e7acdf58c80018a69ea3ff6d311d5e9: Table29c7f8f8df026c49d8ea3ad088e8780a + table_5e34805f74fb904a4f6c1cb475154d11: Table2e5e86f744edaeea91caedf4496cd21e + table_26eae7010f00790dcb9fcea51b458b20: Table27112b32955bc32b3cf3abc78f6041f7 + table_5a7765fcdd3e8de9d430693787b3d7e8: Table6a8129f282adc469ee9233bcf63f20b7 + table_0be8b4549e9512252af1761de32647d1: Table55cda7b389c3f5e26b58e806dc82d6cd + table_5a161ff0fcf3e07c472290ed26b22b88: Tabledddb567693b67dedccc76feeaf305885 + table_1787f968ce9e996c38ea93516367e7d9: Tableb45f137169628885a5507a98a1fd203b + table_59aa2c8b41281fdb8918df77e2d7f549: Table4d0fb43fef8f71d027e1c62ff7b83c1f + table_7c73f0112ea394abeaac85d07c32c96d: Table26d9e67842818bfccbbfca6020d3441a + table_1c0b897074552cc11aeffb1cd2023038: Tablee6de3a3fdf132b2b794ad9358fe01719 + table_7232d71e7a31c3959d4f9758b01bd87b: Table5bdeb7407d8776f9295b3ae2eb482855 + table_c5b4c43869f38cb5e5ca94ba8e823f70: Table259a82d9d67d1b779666191753027e2d + table_ed7ed6a3c5b4edbc5cb93ba6ccf845b0: Tabledfcfa50cfe70d46b898ed0fe276855e4 + table_00970b22f199c1f1097c435cdd756efb: Table11e00101e1b2f60d0a2acfcf46151908 + table_a7991c3173c68564fa7034c40ed76e50: Tableaa828347830464c8d6fb6070585f8786 + table_81342351d9b0750a6a1867e61a69f57d: Table5e1a250360f2e59810faaec5dec74bfb + table_20453ddb146769fa6cfbba4518a94e35: Tablecb67af6a70220cf4b2c4e1121d9351c6 + table_34062ca76ff4de600cd82d2867d743d5: Table01687ac6f71bbab86d7fb8482bf71301 + table_5bc008425c0529ce7f1bf46b23bb12df: Tablee4612831426584576f2d39997ccac9c8 + table_44b3b2fbc1525a37fef79e3ac36ae137: Tablebca1b3f3c2526216b2f01c01fa85f3f9 + table_ac000b4f6f0f6a63f812a54a2fc1d54d: Tablecac2eaeb16e94e019e7e98240c4bac17 + table_d9240bae841332419073d023ec9d7da3: Table7eb5460a0c6690c1dff53fe4940240db + table_7d2894dd74c1eb98e683d83cd9f5e554: Table5c88bed5704d2054a84d44150bf10f21 + table_3c21e15fe7f88da04c6eb6546f1f0c45: Table148eb9256ed9e01df75e345bd7e5c9f7 + table_1f2e67e4f6060a2f4483f85e11e9a4a0: Tablee2c77a8b952bdea3bc2cb7261168ec45 + table_9eaad0288ab657d15b0b89a9b118295d: Tableabd2380e09dc7a608bb7e5c33654540e + table_1a1463b3e26cc157b5bbbb8fde616025: Table7117bf3bff290101f4fa6d6de627b58f + table_7349c3b05f3dfb291a9a73aecd2d61a0: Table202a1f7684d2c58afd3885112de82158 + table_2e34d0c29c1107b75c385543999c12eb: Table93aeee94c0d8d4e08a56c97185d68ae7 + table_06d62f58421acbf930a661bbd3ce7452: Table70c085cf2d0edd14f7dbae474f064b1c + table_aad0e25ecf17545e7bec374e476f9b47: Table2b11443e8af088b453d5119d135803ac + table_ea23a0a1382ceb403c98dfa1a709b361: Table0a542ca892cb0eea27538d7360f718ec + table_f84e347fd6617acc6a0f6a8973248874: Tableb8378493b92a26626ae5745222c8ba69 + table_1adc14dc0a7ec969c3e77d40758cd493: Table565a308ecf3782bb5eb0197187361913 + table_292a9ebdda857f983a6fe42a2c434e05: Tablede86128413dcd68bd6d1ca009b6bae17 + table_36992d0f70a50b1b2ffabb5eea57bd1b: Table57dadc25e9a34c53f66b5cb499d75904 + table_268590e60e51ec5d0b870c82481f2b2e: Table366c7f7bccaea5ff455a9b9265448ebf + table_132d4b3547909bc6256d34163fb57eb7: Tablea4ca5018c98bd7912524f97ccd0a8757 + table_c7c8d495ce776873a2da62c508138d34: Table402dd89f94d2a88ccdf049224dfc8700 + table_70aaa597ccbbd5cd92d99b1cfa7c8b1e: Table92498a6babb7032cdcad6e43158a3359 + table_028c49ccb95cbef10c800198d6d80928: Tablee90356817b37536144c4cf962e9e5165 + table_3d3048db19a6783cbcd9a6ced2755859: Table61a79fc440f7ca2d4190d47ee809f66c + table_b900a90f5f896392fbb4c9055bf75465: Table7051320fedfb456818eb15cdf217186d + table_c1beb04a7642970cf4e59164d0b162ab: Table2d7cdf1ccac4544f81ac78a12d5fba7a + table_8cdd0973d9ca586415d14a8f279149a7: Tablea8e3bfebcd001eac1185867f7dec94a5 + table_50c315b1fbd8484b7d31c7bbba602733: Table148ce21c70970d2809c4028c229445be + table_a4492608b8eebc6dfc51867d1829953f: Tablef650c769203b8bd7eed5a8b7e249c0a5 + table_46cb140f325195b7e28886910ba67990: Table8b9070a970ee019dd472ce6c4a08418b + table_ae8048f57d533f1206ddaff81f6258d5: Tabled580c05f239408ff0392e235078a0ac9 + table_dad30ddb3ecff3c395383e834f041676: Tabledd7d780df70068dcb36a8d8b86bd5298 + table_d6303bbcbeb3da317670fbb8167bfa1d: Table48df920caa8cc60fd47820e9d94ea940 + table_6611f9ee209aef523c4dcde78383a3f1: Table9bb0301f7ca02953fac2add8dcd7630c + table_8d9107a07a519a3e02e2ce5e0f68bd8b: Table5492e76278a71210d7231f4bf905ec2f + table_9c0640720d7b649f506ca4860e443f35: Tableea8e45026529937b0cecd544d8801cfd + table_ab478c8f5bc3681081805bcdc6e4d0c5: Table574ff9acd571619424cd55716f5f1dfb + table_92917d401ca6fb8bf405fd92c407fc13: Tablea79aeca54482635868f02356a51fa369 + table_a68acda553f5f089df441d59eeff1d9c: Tablee7a44a84d410fa64377504e3aa7f72b6 + table_99e321b176fbf3589a92e6084f6c14d4: Tabledcc9250fc52d5fbc25a56cf9c4089073 + table_7518c800f93e5459daa1ff73c7fba821: Table4d82bf6c52ed1355768c73593994c5c2 + table_49781987f16dbfbb517b355b5e7f82b9: Table73f359bc2658d254af39135aed8c3bf2 + table_76d040ce360ee5b120a40f7066084137: Table8cf85c63dc3200ef8145fc0344d00f16 + table_e89504d58e9f3da99aa4c0e6c4284088: Table401ef7ed8ddaa97932ede0de0b157c04 + table_5ceb5499052a2078ef4fce93f69467f8: Table3e875ede7feab48a89082e0c87c364f0 + table_025ad7e58da04ed8536959ba4103b6ae: Table7822bcc86140bf34bc6cdacbd734c0ef + table_312cefebb95f0e122bc9915cc4159167: Table459dc31349051f20a755552adaf60c81 + table_fff4c6195261874920bc7ce92d67d2c2: Table1b8610f190607dfbdafa9c71f72acd43 + table_02bed0f193a8ec672c01e4c7da096850: Table1edc1b921ba66176c3ec62961c248f78 + table_a5fe391b0937a21fdd489d49b271167a: Table9b72afad4afd63d81ab6ef56c926765d + table_17f5074d56437c231c6541a447d3ec23: Table309e0b9a80a4ad911a672f7174429e35 + table_1d97d2be8972551ff4d686c373055915: Tablea0eb46b195e5cbd5e85384a9a1622c14 + table_7025bf2bf5e2e0d6a4487fc0cfbda364: Tableea5b8f9c56ff4ae4cb3c8f22541b33ba + table_50b53baf2b58394268ae89bddaf7c095: Table3a87f98012aa2362e8eb64ed4d9e8f65 + table_50430e0942ebf25480aa9da4b89279bf: Tablefe2e32091534caf00911fc7435cbc97b + table_86e46f16f4e6a386a521c67241d2d42f: Table3cdcee0d77b622e8a2ec654a21270877 + table_a697494b3fdab0b4e126bd3a64e9f9c7: Table8077f242ad5e05394a3dd81ce79565f7 + table_6e128f9931a1632c258c1281fdf4636e: Table52a8644bfd17799495525f2fd8adc480 + table_b43f07de70bf895db779f5f97cb8d105: Table74bb684c41a71a06f561e10ffa4e3323 + table_dfdf6321467f7b66dd8ad7b08e1d54e1: Table64ac7b9a171e9af222924b693d44887c + table_6c334f6291be7fa62a9aca0feca9da96: Tablefd230cdd0c0d7bc04b06cffa3bc3fa3e + table_d4391454b38c50461bc8606d5dc6e203: Table2bf8003c7e2a7344f4d30c3a351926c5 + table_d35939386c5c0d22ce7f7c32e8646e0a: Table5c1f23359d009924d75dac9200da99ab + table_82a555b6d488646ce24524e71bb056f5: Tablea6cdaf7c2c1c27d8389fb8ec7831b240 + table_bb0744a0bc7973cbcca7a79bad78451e: Table618b14672aa41a4ddbaa07b4668e9ceb + table_707742b6518f4d5b912446969bfc2288: Tablee0ac1a12db533e45722bf75854c5f68f + table_99ebe26a1b9b9b2bf0ae1e00435dbebd: Table6b64130a9ac5e9179051a15684e76956 + table_0f9e8815806e611d4c51af6a6e4f1a0f: Tablec3c4b9ba46ff23ee52e9fa59ba4cbd42 + table_81ae6fb42f5779dfbad0a06795277f3b: Tableac8f964f7407177bed83d5a1b563c4be + table_ac0e4fab912414bf6c4d82ca5e679862: Table0e3703752e6fb26a7c95ffbf9ba62354 + table_6cbf92b1a3e27faab6982aafe47bc0fd: Table051ebef2507af0ef791ed665f9df9f69 + table_ffd3383867c4ae4d8c200d3c09006427: Tablea85ed4b894e81fcae5b5f32832c0a4aa + table_4566a5569c4fa2c2ba07bfa6b8397135: Tablef2e554fc6e599ca882cad3f9c8944c5f + table_8bf9d631744222f061702b22effbed68: Table92318b69e7164d55b1815a563a4f0fda + table_fe3fd6febea537a97cc193cfaef7aa05: Table11c3ad790c98516ecb794068e8fe4332 + table_af3d9c9d6bb7af18c920bc8963996ba1: Table0b9fd044caf91b1c9c0decf463f48479 + table_eab40d2792fcf58cdf6d56df7c676d02: Tablecb5f0e2e2a6bb82fe0ec713f3001adae + table_81859a5a7cf340e00333e133ee83c6a3: Table05f7a75fd9ce14b6ff3abafe6a0315cd + table_5b6c09d8090e38e65507dd7138348724: Tablef9d0cc88ca4af2fc064f9fe28c1cae51 + table_1084015020d8bed5c99852780cd060b5: Tabledf515f554daadb410af199b9d2af4968 + table_56bb19565d266b3c5db4b36b54121de1: Tablee7013b1aa66ff80026b9594533e73417 + table_fc8beec5010138f14cac210396ce946a: Table6fc94749b5f65b04e1364bc84a3b675a + table_b1de95565fefb12c1b5e9ced0c31aaba: Table7e5a6e895e47f444ce7042734df8ce92 + table_7ee33378e7a9581242b177c22d55035c: Table03fcd39a79bd9fbbc8f2f32371eb6a9b + table_889380bbad7db8828028ff1756840b4e: Table3edc0e801929e10d8dd381561aa2bd31 + table_a89ef28d2e368372d285517fbcd8c8ff: Table75f7cd025a872d2698d2a6e53a8cd953 + table_3176e3c369a24003ab8f6bdeb5e36fb7: Table075f9410d29eaec83d4f68c3dfa82a10 + table_28536ba4b4a961d66303d15d863e9bbf: Tableb91d0a254d43344084dc0efd98b90946 + table_905ec07246a5e10d75f1ec0c71c1cbb8: Table4d4605d2d071f927c338880fcda7b540 + table_649ac5d5790cfd996132f99bcae54699: Table14a5541144254091c320909a95c4c614 + table_9034bb7c1383ffc26a086c9da4db9f44: Table9eb67e79e0e2abbb0a295904fd81d805 + table_5cc5636d8577bebe57cb65d9f80ccf60: Tableb16695c526d6fa5e20b329d5eabfd364 + table_943bf2c7f95a1de4c96d117762255431: Tablea700a17706246884b5a04cafcebeaa55 + table_a99e53e8b0ea6fb028b8335f6879b541: Table6a853060686c878e7535e29bc3772d73 + table_dbdc90d2efd6251b1dc89255b5547d58: Table2c1e8df56b265a10929de25e4593033b + table_011ff64548a9d77b1672d61c71b144cd: Table3c8b015b7697cce06653b215afc8acd5 + table_7dd9f7bddf3aaf04099d008f1615d84d: Tablef058a40da08114d390fcea4b81b4f0a8 + table_91ae77857e698e702b1d36d8086e94a4: Tablea6a7b2d92feb037592b7ed49c34d1e54 + table_5e350d0500edbf693ecf31bc420dce10: Table4aba31682ab92f6f2baae3f68f9dc1ad + table_986fcbfdf73cf8637d5863efcc4a23b7: Table75d4ed2c1cedc7a0f7e36059177a8837 + table_87b2787be746d9af6fa1f02c7174b6de: Tablec3ba8dac5adcbeb93ed2dd458b6ad4a1 + table_adebe9d523b0e904d5a23244df8acc86: Tablee53ad4b421c58913d023a3296c13419e + table_0e3a2fd2e1be1fb139d982cc4cf27a37: Table980786dce470ebfd2621534ebcd5e6e9 + table_044c3ac3bb3a8f36c94c6914fec4c640: Table1a270e99026f39aaf8e33546e1c2c39e + table_0b5ac72e03509e06683edcba4b3887ab: Table380b3be3b993931074af40f4e0af76f3 + table_2746d6a0415f4e97db91054eaad8f549: Table4a03b332b99d0dab4e359b9b2e9132f3 + table_c3489d7044badb74bfa78892e5af3c50: Tableb690efdc73ab53d741824e87ddf41a0a + table_27157dcf07c6222108aee0ad07fc3c84: Table80586ee503601f161507ee3f207fa19a + table_9616c4051420073951c9dadfe4cfecd8: Table138bb88f13d65a10a42882c2578d7839 + table_382969f15d228ca40eaaf6ae3af42dd0: Tablef8ad778cddf738c853992b7f5446b4f1 + table_ba15c662ce189e01e69a2426db41e884: Table9f6e2daac23f8ae268d4557cb47cb202 + table_ef0c79ab9a79c6eedf5a3738c59b4e35: Table7ff09e5ace1dbf00f39b6358c5aa3817 + table_737ecf944683adc260346e8cc807a707: Table3527de031c6623c0eba6355dcdd45a6b + table_38773f13c7c7902bd4b3717a240873e7: Table09612d694974820d8807b91ecde8f26e + table_1a55586b73d1a759c1eadbafd3e87c2e: Table38195ba8de22a862c0f40f70ebec25bb + table_de936835b986b7e9a72b8706204dc183: Table93037210a648b88105c5ee2473337821 + table_1ae34354f4623d6118be8b39a6c33401: Table0b5857bb9e98480275f017b7af173e3f + table_b1d00f154cae4b5689f1c60fd746cc6c: Tablef27ebdbd2754995818491c1018692ce5 + table_5dd25bad4af1a1b2e85d63d182300992: Table6009b7b4db0ba922eead74b775f40f8c + table_d119c7e31c78a3c779aae46a89f48594: Tableb6b0fa946d389417c5c3f14aa8ff718a + table_1c9d336338cae6fb14a0990bd1c54bc7: Table3edf238f7262a23abe0751a2ac0af6ff + table_6b6b30980569c916119c335ee3ecd6fd: Table55ac07dee59e4a2d00136b025cc01d9e + table_c5c92cab080fe1234767a8be5814e634: Table09e8ea41829a99131a2920761d339204 + table_0556e22da4d46d9d6f4f679de33c729b: Table7a616917b50007f39137fa41d2f51ab3 + table_d1b04d199a69310996ab11fa49aebf4d: Table5d8df59e64a9eeca85daebca610e21a7 + table_03fd35f2b6a928e66a8894f914fdeb1a: Table526124c9359353a7e56271d12d9fcf0c + table_18563b6f693d0c3e17d63aad91681eba: Table6bba2bdcbf233fb7649d1f614417da41 + table_5d1d4bbd5ec1f145b6fe12b78aa0a2ee: Table390f512e2274731b2d168d8f19da171c + table_c1069472c40f0480a45ee4dee787c4d1: Table1899f801ed13e5910d18c6b08028d7bc + table_b20ae4cbae25a95b31299dc9033fd532: Table1082c28dec8a8ffd8ce641335442372f + table_5761eb47c363bdcf7bbf68c1801bf699: Table72909a5ac37995f967b619c9cafa07d6 + table_404d5ee6f26bda1b4be093317b500097: Table81a2bed79d9365d1982e76dca5a676bd + table_e8e1d616dac945e0ee0d05480ab77957: Table9b567a9f0bdf26ccd8202eff33ff637b + table_de8db519594b7d21efea9f31260b2423: Tablecb69558ad9c32a83ec1e61169d89de2f + table_735c26d97cd342c6161c22f66cc99511: Table3d90cba85411f05feed564dbcd2e6e55 + table_cf38d23f2daeff354349485b97299972: Table32254855b1a9a81426acafd370a0edc3 + table_92df6eeac3e4b00edeee9dfe99d6640c: Table69cb4926463c11065ab61382047dd490 + table_fefdea6d099a9810a67b711700a35a8d: Tableccc5e7a07cecf45f43c5c4efb6bbcd8a + table_a3cb20d19c33e8fb3b00b07fba07def0: Table1e275afc8276112b99cfc6f49842958c + table_d5db6cc36112076d805e58cb5ec13850: Tablef9ce3585ff20a0b1dd731bdd34cf0ad9 + table_dc93e59ae64c8cdae881b6f25d64564b: Table24139be0f90bb33600380f06b12b7f1e + table_6efc03d13cdcfd25a9ce3e87fc5456e7: Tablee0ce7ca1270b4541c302833574025ff0 + table_6dbc88c5b052629e050a099e04d7be3f: Table129722fe7124ca893b45b3f11aa2797c + table_4a4402f5d23fa4f9df3b8bb8e3dc2d32: Table361ca453b125de0694d45757ce574ac8 + table_8e94e6bf050f60606c5da22bcc6bb9b2: Table682bfd8f39f1d3c2f141f8d1bfaba332 + table_170edf3aa8f832f0f36d9b9a0c549ed4: Tablea4885bc4409d5d6aeca7a333deb32f36 + table_8320808a7934e9fa32c17c6499414fb1: Tablee8de821cfe0519477927d4aceb53aedb + table_ff3ba17c4964fdcaa9d663b6fb483dd3: Tabled0b3106159632181125a90621e656efe + table_8f9d849161a30cb7431d221283f29c43: Tablef8d58e2b9ad74400d9d3b73e1c56b24c + table_593cef89801d5094cdd7ad51ea3eb29c: Table7f3edc307df1ebe46a26c3cdcce01825 + table_e021bdbeb32ee1578e7462ebf75dfb7a: Table4cb9cce2545216afbbe27fd7f598670d + table_2d8fef6ee4574f9180a0c7f593f47442: Table075be2c4bc1569d9e2a0f43c706845cd + table_cdf7f8adce5092d3805a7526a2551c2a: Tableb0475c12dae1800e6f9bed0ecc74d8ac + table_ea38a156b8018fa2d1034393d595c1b5: Table9273711f2c37ed469c438c6e604205ad + table_871b4c9fc59eb1005340453c9936c38d: Table674852753d920a7b8c85e3d7f0741d69 + table_000a8a0cb7f265a624c851d3e7f8b946: Table93fcd1b734496b580b42aff395ed8deb + table_e868614c9689160521a0f7cd8fe444f9: Tabled97726553a6203a2e1fe24edf923c1bf + table_eb4b47c599bd30509bef47d1ea3a29e0: Table10a7b3d08bae6a280681dd4b1b4d03ea + my_table: MyTable + table_1474a7e0348b1ca363ee4a2a5dc4a1ec: Table5e096b65e80874785e32076304380404 + table_921d1c0613d8e78089f21fdc086c6254: Tablef3ed8107e22455983dfec1061f270c5b + table_8f856811783bf2c6dc1cd3fafa065e91: Tablec051ae09c6cf6d7d3ea3732241b7ec9d + table_276c7389f255e47fa56f3db3b7b203f4: Table58d873381dd856073dc8af727f75a83c + table_f0e61821517de97ae60ce2db4211f6de: Table2efbbc557d528fa0179d8200f20bd375 + table_444765b0f61d176f3e075fcd0aba7ac9: Tableb1c2cd01d00c7351140f576d84e64fc1 + table_7a27c425067f969bf5207fe7646fd5c7: Table173d3cc6670ed190157f57b6fc5f789f + table_b4454c9867da1740a95d198a0309bb1c: Tableea7fc406759eeeabe58177f5dc5b2749 + table_d7b45912e5ca97cdbb9a13ddeae017e9: Table5d31333676303c399518c2fc4cf6ce6b + table_ede804aecaaa0ad1a5afffb9b2a0d927: Table411a4da56c483124eeb78d27496b6bcc + table_18c53fd6b99123cd1d5416c633d1d257: Table90b86be76e1fe1dcbfeb23aac1268f60 + table_3b5daebf6b386d473d143fa615a63b30: Tablead803551807f7dd640a7431281e60024 + table_3e32e29fb3ace788a139de83f6baf360: Tableacd9c0e145638abbf38c6c9982b5d978 + table_6b330a3b9c49a6e7867514797facf15e: Table03d5e3f6a5a1305f36b6f5e7b40f8607 + table_0193342fd1dd6f0d57893e54a6235090: Table1ad14a94caab8e7087a497085d7136ee + table_c5f1901de2a3954057ebdea18ec92851: Table13e2dfe71a6146bf0f7286309cee804f + table_b5e6a54f6ffa9f4314e45fcf5ddfc499: Tablec227d3e74b291218da01d96ad8e3cbf3 + table_da9bc7793b7e3784c03d55128145b7e3: Tabled861babbb2f5fa7cd7537704e5000a83 +} + +function testHugeDBSelect(db: Kysely) { + db.selectFrom((eb) => + eb + .selectFrom('my_table') + .where((eb) => eb('my_table.id', 'in', [1, 2, 3])) + .selectAll() + .as('test'), + ).selectAll() + + expectError( + db + .selectFrom((eb) => + eb + .selectFrom('not_a_table') + .where('my_table.id', 'in', [1, 2, 3]) + .selectAll() + .as('test'), + ) + .selectAll(), + ) +} + +function testHugeDBInsert(db: Kysely) { + db.insertInto('my_table').defaultValues() + + expectError(db.insertInto('not_a_table').defaultValues()) +} + +function testHugeDBUpdate(db: Kysely) { + db.updateTable('my_table').where((eb) => eb('my_table.id', 'in', [1, 2, 3])) + db.updateTable('my_table') + .from('table_000a8a0cb7f265a624c851d3e7f8b946') + .where((eb) => eb('my_table.id', 'in', [1, 2, 3])) + .set('my_table.col_164b7896ec8e770207febe0812c5f052', 1) + + expectError( + db.updateTable('not_a_table').where('my_table.id', 'in', [1, 2, 3]), + ) +} + +function testHugeDBDelete(db: Kysely) { + db.deleteFrom('my_table').where((eb) => eb('my_table.id', 'in', [1, 2, 3])) + + expectError( + db.deleteFrom('not_a_table').where('my_table.id', 'in', [1, 2, 3]), + ) +} diff --git a/test/typings/test-d/infer-result.test-d.ts b/test/typings/test-d/infer-result.test-d.ts index 4ec7ed3a0..94fe12515 100644 --- a/test/typings/test-d/infer-result.test-d.ts +++ b/test/typings/test-d/infer-result.test-d.ts @@ -47,7 +47,7 @@ function testInferResultInsertQuery(db: Kysely) { }) const compiledQuery0 = query0.compile() - type Expected0 = InsertResult + type Expected0 = InsertResult[] expectType>>(true) expectType>>(true) @@ -74,7 +74,7 @@ function testInferResultUpdateQuery(db: Kysely) { .where('pet.id', '=', '1') const compiledQuery0 = query0.compile() - type Expected0 = UpdateResult + type Expected0 = UpdateResult[] expectType>>(true) expectType>>(true) @@ -111,7 +111,7 @@ function testInferResultDeleteQuery(db: Kysely) { const query0 = db.deleteFrom('pet').where('id', '=', '1') const compiledQuery0 = query0.compile() - type Expected0 = DeleteResult + type Expected0 = DeleteResult[] expectType>>(true) expectType>>(true) @@ -138,7 +138,7 @@ function testInferResultMergeQuery(db: Kysely) { .thenDelete() const compiledQuery0 = query0.compile() - type Expected0 = MergeResult + type Expected0 = MergeResult[] expectType>>(true) expectType>>(true) } diff --git a/test/typings/test-d/insert.test-d.ts b/test/typings/test-d/insert.test-d.ts index e8f049ba1..f4325c99e 100644 --- a/test/typings/test-d/insert.test-d.ts +++ b/test/typings/test-d/insert.test-d.ts @@ -1,5 +1,5 @@ import { expectError, expectType } from 'tsd' -import { InsertResult, Kysely, sql } from '..' +import { ExpressionBuilder, InsertObject, InsertResult, Kysely, sql } from '..' import { Database } from '../shared' async function testInsert(db: Kysely) { @@ -268,3 +268,126 @@ async function testOutput(db: Kysely) { expectError(db.insertInto('person').output('deleted.age').values(person)) expectError(db.insertInto('person').outputAll('deleted').values(person)) } + +async function testValJson(db: Kysely) { + const getValues = < + O extends Partial>, + >( + { valJson }: ExpressionBuilder, + overrides?: O, + ) => ({ + array: valJson(['123']), + experience: valJson([{ establishment: 'New York Times' }]), + nicknames: valJson(['Jenny']), + person_id: 1, + profile: valJson({ + auth: { + roles: ['admin'], + }, + tags: ['important'], + }), + website: valJson({ url: 'http://example.com' }), + record: valJson({ key: 'value' }), + schedule: valJson([ + [ + [ + { + name: 'foo', + time: '2024-01-01T00:00:00.000Z', + }, + ], + ], + ]), + ...overrides, + }) + + db.insertInto('person_metadata').values(getValues).execute() + + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: null, + }), + ) + + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: eb.valJson(null), + }), + ) + + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: sql.valJson(null), + }), + ) + + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + website: sql.valJson({ url: 'http://example.com' }), + }), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: ['123'], // expects `valJson(Array | null)` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: eb.val(['123']), // expects `valJson(Array | null)` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: eb.valJson({}), // expects `valJson(Array | null)` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + array: eb.valJson([123]), // expects `valJson(Array | null)` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + experience: [{ establishment: 'New York Times' }], // expects `valJson({ establishment: string }[])` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + experience: eb.valJson({ establishment: 'New York Times' }), // expects `valJson({ establishment: string }[])` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + experience: eb.valJson([{}]), // expects `valJson({ establishment: string }[])` + }), + ), + ) + + expectError( + db.insertInto('person_metadata').values((eb) => + getValues(eb, { + experience: eb.valJson([{ establishment: 2 }]), // expects `valJson({ establishment: string }[])` + }), + ), + ) +} diff --git a/test/typings/test-d/kysely-any.test-d.ts b/test/typings/test-d/kysely-any.test-d.ts index 74c849380..2cd376411 100644 --- a/test/typings/test-d/kysely-any.test-d.ts +++ b/test/typings/test-d/kysely-any.test-d.ts @@ -21,7 +21,7 @@ async function testKyselyAnySelects(db: Kysely) { .selectFrom(['foo1', 'foo2']) .select(['spam', 'foo1.bar', 'foo2.baz', 'doesnotexists.fux']) .execute() - expectType<{ spam: any; bar: any; baz: any; fux: never }[]>(r5) + expectType<{ spam: any; bar: any; baz: any; fux: any }[]>(r5) const r6 = await db .selectFrom('foo') diff --git a/test/typings/test-d/select.test-d.ts b/test/typings/test-d/select.test-d.ts index d3b0837e8..fd5997951 100644 --- a/test/typings/test-d/select.test-d.ts +++ b/test/typings/test-d/select.test-d.ts @@ -1,5 +1,6 @@ import { Expression, + ExpressionWrapper, Kysely, NotNull, RawBuilder, @@ -132,6 +133,12 @@ async function testSelectSingle(db: Kysely) { expectType(r17.callback_url) expectType(r17.queue_id) + + const expr1 = db.selectFrom('person').select('first_name').$asScalar() + expectType>(expr1) + + const expr2 = db.selectFrom('person').select('deleted_at').$asScalar() + expectType>(expr2) } async function testSelectAll(db: Kysely) {