Spaces:
Running
Running
Download source/teaql-ts/examples/conformance/src/teaql-node-sql.ts from teaql/browser-sqlite-playground: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/examples/conformance/src/teaql-node-sql.ts
- Command line
-
hf download hf://spaces/teaql/browser-sqlite-playground/source/teaql-ts/examples/conformance/src/teaql-node-sql.ts
-
curl -L -o teaql-node-sql.ts https://huggingface.co/spaces/teaql/browser-sqlite-playground/resolve/main/source/teaql-ts/examples/conformance/src/teaql-node-sql.ts
1.37 kB
| import { EntitySchema } from "teaql-ts/sql/core"; | |
| export const ENTITY_SCHEMAS: Record<string, EntitySchema> = { | |
| "Platform": { | |
| table: "platform_data", | |
| columns: {"id": { columnName: "id", modelName: "id", logicalType: "integer", decode: "string", nullable: false }, "name": { columnName: "name", modelName: "name", logicalType: "text", decode: "native", nullable: false }, "version": { columnName: "version", modelName: "version", logicalType: "integer", decode: "number", nullable: false }}, | |
| relations: {"workItemList": { targetEntity: "WorkItem", localKey: "id", foreignKey: "platform", many: true }} | |
| }, | |
| "WorkItem": { | |
| table: "work_item_data", | |
| columns: {"id": { columnName: "id", modelName: "id", logicalType: "integer", decode: "string", nullable: false }, "title": { columnName: "title", modelName: "title", logicalType: "text", decode: "native", nullable: false }, "description": { columnName: "description", modelName: "description", logicalType: "text", decode: "native", nullable: true }, "platform": { columnName: "platform", modelName: "platform", logicalType: "integer", decode: "string", nullable: false }, "version": { columnName: "version", modelName: "version", logicalType: "integer", decode: "number", nullable: false }}, | |
| relations: {"platform": { targetEntity: "Platform", localKey: "platform", foreignKey: "id", many: false }} | |
| } | |
| }; |