Initial commit - Event Planner application
This commit is contained in:
60
node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.js
generated
vendored
Normal file
60
node_modules/kysely/dist/cjs/dialect/mysql/mysql-query-compiler.js
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.MysqlQueryCompiler = void 0;
|
||||
const default_query_compiler_js_1 = require("../../query-compiler/default-query-compiler.js");
|
||||
const ID_WRAP_REGEX = /`/g;
|
||||
class MysqlQueryCompiler extends default_query_compiler_js_1.DefaultQueryCompiler {
|
||||
getCurrentParameterPlaceholder() {
|
||||
return '?';
|
||||
}
|
||||
getLeftExplainOptionsWrapper() {
|
||||
return '';
|
||||
}
|
||||
getExplainOptionAssignment() {
|
||||
return '=';
|
||||
}
|
||||
getExplainOptionsDelimiter() {
|
||||
return ' ';
|
||||
}
|
||||
getRightExplainOptionsWrapper() {
|
||||
return '';
|
||||
}
|
||||
getLeftIdentifierWrapper() {
|
||||
return '`';
|
||||
}
|
||||
getRightIdentifierWrapper() {
|
||||
return '`';
|
||||
}
|
||||
sanitizeIdentifier(identifier) {
|
||||
return identifier.replace(ID_WRAP_REGEX, '``');
|
||||
}
|
||||
visitCreateIndex(node) {
|
||||
this.append('create ');
|
||||
if (node.unique) {
|
||||
this.append('unique ');
|
||||
}
|
||||
this.append('index ');
|
||||
if (node.ifNotExists) {
|
||||
this.append('if not exists ');
|
||||
}
|
||||
this.visitNode(node.name);
|
||||
if (node.using) {
|
||||
this.append(' using ');
|
||||
this.visitNode(node.using);
|
||||
}
|
||||
if (node.table) {
|
||||
this.append(' on ');
|
||||
this.visitNode(node.table);
|
||||
}
|
||||
if (node.columns) {
|
||||
this.append(' (');
|
||||
this.compileList(node.columns);
|
||||
this.append(')');
|
||||
}
|
||||
if (node.where) {
|
||||
this.append(' ');
|
||||
this.visitNode(node.where);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.MysqlQueryCompiler = MysqlQueryCompiler;
|
||||
Reference in New Issue
Block a user