Skip to content

Commit

Permalink
Merge pull request #108 from invisal/develop
Browse files Browse the repository at this point in the history
deployment
  • Loading branch information
invisal authored Jul 1, 2024
2 parents afb40a5 + 35c320d commit e34dfbc
Show file tree
Hide file tree
Showing 68 changed files with 2,110 additions and 1,394 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ yarn-error.log*
**/*.tsbuildinfo
*.tsbuildinfo
next-env.d.ts

certificates
33 changes: 33 additions & 0 deletions build-dialect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require("fs");
const path = require("path");
const showdown = require("showdown");

function build_dialect(dialectName) {
const dialectFolder = path.join(__dirname, "src", "drivers", dialectName);
const functionFolder = path.join(dialectFolder, "functions");
const functionFiles = fs.readdirSync(functionFolder);

const functions = {};

const mdConverter = new showdown.Converter({ tables: true });
for (const functionFile of functionFiles) {
const mdContent = fs
.readFileSync(path.join(functionFolder, functionFile))
.toString();

const mdContentLines = mdContent.split("\n");

functions[path.parse(functionFile).name] = {
syntax: mdContentLines[0],
description: mdConverter.makeHtml(mdContentLines.slice(2).join("\n")),
};
}

fs.writeFileSync(
path.join(dialectFolder, "function-tooltip.json"),
JSON.stringify(functions, undefined, 2)
);
}

build_dialect("sqlite");
11 changes: 11 additions & 0 deletions drizzle/0009_peaceful_caretaker.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE `dataset` (
`id` text PRIMARY KEY NOT NULL,
`user_id` text,
`name` text,
`source` text,
`summary` text,
`description` text,
`used` integer DEFAULT 0,
`created_at` integer,
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
);
Loading

0 comments on commit e34dfbc

Please sign in to comment.