import { Logger } from "../test-adapter.mjs"; import { TestSuiteStats, createTestSuite } from "../create-test-suite.mjs"; import "../adapter.mjs"; //#region src/adapter/suites/basic.d.ts /** * This test suite tests the basic CRUD operations of the adapter. */ declare const normalTestSuite: (options?: ({ disableTests?: Partial & { ALL?: boolean; }> | undefined; } & { showDB?: () => Promise; }) | undefined) => (helpers: { adapter: () => Promise>; log: Logger; adapterDisplayName: string; getBetterAuthOptions: () => import("better-auth").BetterAuthOptions; modifyBetterAuthOptions: (options: import("better-auth").BetterAuthOptions) => Promise; cleanup: () => Promise; runMigrations: () => Promise; prefixTests?: string | undefined; onTestFinish: (stats: TestSuiteStats) => Promise; customIdGenerator?: (() => any | Promise | undefined) | undefined; transformIdOutput?: ((id: any) => string | undefined) | undefined; }) => Promise; declare const getNormalTestSuiteTests: ({ adapter, generate, insertRandom, modifyBetterAuthOptions, sortModels, customIdGenerator, getBetterAuthOptions, transformGeneratedModel, transformIdOutput }: Parameters[2]>[0], debugTools?: { showDB?: () => Promise; }) => { "create - should create a model": () => Promise; "create - should always return an id": () => Promise; "create - should use generateId if provided": () => Promise; "create - should return null for nullable foreign keys": { migrateBetterAuth: { plugins: { id: "nullable-test"; schema: { testModel: { fields: { nullableReference: { type: "string"; references: { field: string; model: string; }; required: false; }; }; }; }; }[]; }; test: () => Promise; }; "create - should apply default values to fields": () => Promise; "findOne - should find a model": () => Promise; "findOne - should not apply defaultValue if value not found": () => Promise; "findOne - should find a model using a reference field": () => Promise; "findOne - should not throw on record not found": () => Promise; "findOne - should find a model without id": () => Promise; "findOne - should find a model with join": () => Promise; "findOne - should find a model with modified field name": () => Promise; "findOne - should find a model with modified model name": () => Promise; "findOne - should find a model with additional fields": () => Promise; "findOne - should select fields": () => Promise; "findOne - should select fields with one-to-many join": () => Promise; "findOne - should select fields with one-to-one join": () => Promise; "findOne - should select fields with multiple joins": () => Promise; "findOne - should find model with date field": () => Promise; "findOne - should perform backwards joins": () => Promise; "findOne - should return an object for one-to-one joins": () => Promise; "findOne - should return an array for one-to-many joins": () => Promise; "findOne - should work with both one-to-one and one-to-many joins": () => Promise; "findOne - should return null for failed base model lookup that has joins": () => Promise; "findOne - should join a model with modified field name": () => Promise; "findMany - should find many models": () => Promise; "findMany - should find many models with date fields": () => Promise; "findMany - should find many models with join": () => Promise; "findMany - should find many with join and limit": () => Promise; "findMany - should select fields": () => Promise; "findMany - should select fields with one-to-many join": () => Promise; "findMany - should select fields with one-to-one join": () => Promise; "findMany - should select fields with multiple joins": () => Promise; "findMany - should find many with join and offset": () => Promise; "findMany - should find many with join and sortBy": () => Promise; "findMany - should find many with join and where clause": () => Promise; "findMany - should find many with join, where, limit, and offset": () => Promise; "findMany - should find many with one-to-one join": () => Promise; "findMany - should find many with both one-to-one and one-to-many joins": () => Promise; "findMany - should return an empty array when no models are found": () => Promise; "findMany - should return empty array when base records don't exist with joins": () => Promise; "findMany - should find many models with starts_with operator": () => Promise; "findMany - starts_with should not interpret regex patterns": () => Promise; "findMany - ends_with should not interpret regex patterns": () => Promise; "findMany - contains should not interpret regex patterns": () => Promise; "findMany - should find many models with ends_with operator": () => Promise; "findMany - should find many models with contains operator": () => Promise; "findMany - should handle multiple where conditions with different operators": () => Promise; "findMany - should find many models with contains operator (using symbol)": () => Promise; "findMany - should find many models with eq operator": () => Promise; "findMany - should find many models with ne operator": () => Promise; "findMany - should find many models with gt operator": () => Promise; "findMany - should find many models with gte operator": () => Promise; "findMany - should find many models with lte operator": () => Promise; "findMany - should find many models with lt operator": () => Promise; "findMany - should find many models with in operator": () => Promise; "findMany - should find many models with not_in operator": () => Promise; "findMany - should find many models with sortBy": () => Promise; "findMany - should find many models with limit": () => Promise; "findMany - should find many models with offset": () => Promise; "findMany - should find many models with limit and offset": () => Promise; "findMany - should find many models with sortBy and offset": () => Promise; "findMany - should find many models with sortBy and limit": () => Promise; "findMany - should find many models with sortBy and limit and offset": () => Promise; "findMany - should find many models with sortBy and limit and offset and where": () => Promise; "update - should update a model": () => Promise; "update - should return null when where is empty": () => Promise; "updateMany - should update all models when where is empty": () => Promise; "updateMany - should update many models with a specific where": () => Promise; "updateMany - should update many models with a multiple where": () => Promise; "incrementOne - guarded set transition returns the row on a matching guard and null on a guard miss": () => Promise; "delete - should delete a model": () => Promise; "delete - should not throw on record not found": () => Promise; /** * @see https://github.com/better-auth/better-auth/issues/8313 */ "delete - should delete by non-unique field": () => Promise; "deleteMany - should delete many models": () => Promise; "deleteMany - starts_with should not interpret regex patterns": () => Promise; "deleteMany - ends_with should not interpret regex patterns": () => Promise; "deleteMany - contains should not interpret regex patterns": () => Promise; "deleteMany - should delete many models with numeric values": () => Promise; "deleteMany - should delete many models with boolean values": () => Promise; "count - should count many models": () => Promise; "count - should return 0 with no rows to count": () => Promise; "count - should count with where clause": () => Promise; "update - should correctly return record when updating a field used in where clause": () => Promise; "update - should handle updating multiple fields including where clause field": () => Promise; "update - should work when updated field is not in where clause": () => Promise; "findOne - backwards join should only return single record not array": () => Promise; "findMany - backwards join should only return single record not array": () => Promise; "findOne - backwards join with modified field name (session base, users-table join)": () => Promise; "findOne - multiple joins should return result even when some joined tables have no matching rows": () => Promise; "findOne - should be able to perform a limited join": () => Promise; "findOne - should be able to perform a complex limited join": () => Promise; "findMany - should be able to perform a limited join": () => Promise; "findMany - should be able to perform a complex limited join": () => Promise; "findOne - should return null for one-to-one join when joined record doesn't exist": () => Promise; "findMany - should return null for one-to-one join when joined records don't exist": () => Promise; "findMany - should return empty array for one-to-many join when joined records don't exist": () => Promise; "findMany - should handle mixed joins correctly when some are missing": () => Promise; "create - should support arrays": { migrateBetterAuth: { plugins: { id: "string-arrays-test"; schema: { testModel: { fields: { stringArray: { type: "string[]"; required: true; }; numberArray: { type: "number[]"; required: true; }; }; }; }; }[]; }; test: () => Promise; }; "create - should support json": { migrateBetterAuth: { plugins: { id: "json-test"; schema: { testModel: { fields: { json: { type: "json"; required: true; }; }; }; }; }[]; }; test: () => Promise; }; "update - should support multiple where conditions under AND connector with unique field": () => Promise; "findMany - eq operator with null value (single condition) should use IS NULL": () => Promise; "findMany - eq and ne operators with null value in AND group should use IS NULL / IS NOT NULL": () => Promise; "findMany - eq and ne operators with null value in OR group should use IS NULL / IS NOT NULL": () => Promise; "update - should return updated record when where condition uses null value": () => Promise; "update - should return null when a multi-predicate where matches no row": () => Promise; }; declare const enableJoinTests: Partial>; //#endregion export { enableJoinTests, getNormalTestSuiteTests, normalTestSuite };