-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from invisal/develop
deployment
- Loading branch information
Showing
68 changed files
with
2,110 additions
and
1,394 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -44,3 +44,5 @@ yarn-error.log* | |
**/*.tsbuildinfo | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
certificates |
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,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"); |
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,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 | ||
); |
Oops, something went wrong.