Skip to content

Commit

Permalink
test(typefusion): make sure to test refs of each table work
Browse files Browse the repository at this point in the history
  • Loading branch information
aniravi24 committed Oct 24, 2024
1 parent d94bcad commit 4c6cede
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
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>;
27 changes: 27 additions & 0 deletions packages/typefusion/example/mysql/typefusion_mysql_ref.ts
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>;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default {
schema: smallSchema,
run: async () => {
const result = await typefusionRef(main);
console.log("TYPEFUSION PG RESULT IS RUN", result);
console.log("TYPEFUSION MYSQL RESULT IS RUN", result);
return {
data: [
{
Expand Down

0 comments on commit 4c6cede

Please sign in to comment.