-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(typefusion): make sure to test refs of each table work
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
packages/typefusion/example/clickhouse/typefusion_clickhouse_ref.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { | ||
typefusionRef, | ||
TypefusionDbScript, | ||
clickhouseType, | ||
} from "../../src/index.js"; | ||
import typefusion_clickhouse_result from "./typefusion_clickhouse_result.js"; | ||
|
||
const bigSchema = { | ||
big: clickhouseType.string().notNull(), | ||
}; | ||
|
||
export default { | ||
name: "typefusion_clickhouse_ref", | ||
resultDatabase: "clickhouse", | ||
schema: bigSchema, | ||
run: async () => { | ||
const result = await typefusionRef(typefusion_clickhouse_result); | ||
console.log("TYPEFUSION CLICKHOUSE REF IS RUN", result); | ||
return { | ||
data: [ | ||
{ | ||
big: "bigString" as const, | ||
}, | ||
], | ||
}; | ||
}, | ||
} satisfies TypefusionDbScript<typeof bigSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { | ||
typefusionRef, | ||
TypefusionDbScript, | ||
mySqlType, | ||
} from "../../src/index.js"; | ||
import typefusion_mysql_result from "./typefusion_mysql_result.js"; | ||
|
||
const bigSchema = { | ||
big: mySqlType.text().notNull(), | ||
}; | ||
|
||
export default { | ||
name: "typefusion_mysql_ref", | ||
resultDatabase: "mysql", | ||
schema: bigSchema, | ||
run: async () => { | ||
const result = await typefusionRef(typefusion_mysql_result); | ||
console.log("TYPEFUSION MYSQL REF IS RUN", result); | ||
return { | ||
data: [ | ||
{ | ||
big: "bigString" as const, | ||
}, | ||
], | ||
}; | ||
}, | ||
} satisfies TypefusionDbScript<typeof bigSchema>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters