fix(deno): remove mysql support waiting for deno fix

This commit is contained in:
Ruben Fiszel
2023-02-24 17:11:53 +01:00
parent 0041411c06
commit 2f78132e08
5 changed files with 21 additions and 22 deletions
-1
View File
@@ -14,7 +14,6 @@ BigInt.prototype.toJSON = function () {
};
export { pgSql, pgClient } from './pg.ts'
export { mySql, mysqlClient } from './mysql.ts'
export type Sql = string
export type Email = string
@@ -245,7 +245,7 @@
>
<LanguageIcon lang="pgsql" /><span class="ml-2 py-4">PostgreSQL</span>
</Button>
<Button
<!-- <Button
size="sm"
variant="border"
color={template == 'mysql' ? 'blue' : 'dark'}
@@ -257,7 +257,7 @@
}}
>
<LanguageIcon lang="mysql" /><span class="ml-2 py-4">MySQL</span>
</Button>
</Button> -->
</div>
<div class="mt-16 mb-4">
<Button
@@ -164,13 +164,13 @@
createInlineScriptByLanguage(Script.language.DENO, name, 'pgsql')
}}
/>
<FlowScriptPicker
<!-- <FlowScriptPicker
label={`MySQL`}
lang="mysql"
on:click={() => {
createInlineScriptByLanguage(Script.language.DENO, name, 'mysql')
}}
/>
/> -->
</div>
<div class="mt-4">
@@ -142,12 +142,12 @@
dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'pgsql' })}
/>
<FlowScriptPicker
<!-- <FlowScriptPicker
label={`MySQL`}
lang="mysql"
on:click={() =>
dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'mysql' })}
/>
/> -->
{/if}
{/if}
</div>
+15 -15
View File
@@ -95,22 +95,22 @@ export async function main(
return query.rows;
}`
export const MYSQL_INIT_CODE = `import {
mySql,
type Resource
} from "https://deno.land/x/windmill@v${__pkg__.version}/mod.ts";
// export const MYSQL_INIT_CODE = `import {
// mySql,
// type Resource
// } from "https://deno.land/x/windmill@v${__pkg__.version}/mysql.ts";
// MySQL parameterized statement. No SQL injection is possible.
export async function main(
db: Resource<"mysql">,
key: number,
value: string,
) {
const query = await mySql(
db
)\`INSERT INTO demo VALUES (\${key}, \${value})\`;
return query.rows;
}`;
// // MySQL parameterized statement. No SQL injection is possible.
// export async function main(
// db: Resource<"mysql">,
// key: number,
// value: string,
// ) {
// const query = await mySql(
// db
// )\`INSERT INTO demo VALUES (\${key}, \${value})\`;
// return query.rows;
// }`;
export const BASH_INIT_CODE = `# arguments of the form X="$I" are parsed as parameters X of type string
msg="$1"