!function (t, n) { "object" == typeof exports && "object" == typeof module ? module.exports = n() : "function" == typeof define && define.amd ? define([], n) : "object" == typeof exports ? exports.sqlFormatter = n() : t.sqlFormatter = n() }
(this, function () {
return function (t) { function n(r) { if (e[r]) return e[r].exports; var u = e[r] = { exports: {}, id: r, loaded: !1 }; return t[r].call(u.exports, u, u.exports, n), u.loaded = !0, u.exports } var e = {}; return n.m = t, n.c = e, n.p = "", n(0) }([function (t, n, e) { "use strict"; function r(t) { return t && t.__esModule ? t : { default: t } } n.__esModule = !0; var u = e(9), i = r(u), o = e(10), a = r(o), f = e(11), c = r(f); n.default = { format: function (t, n) { switch (n = n || {}, n.language) { case "db2": return new i.default(n).format(t); case "n1ql": return new a.default(n).format(t); default: return new c.default(n).format(t) } } }, t.exports = n.default }, function (t, n) { "use strict"; n.__esModule = !0, n.default = function (t, n) { if (!(t instanceof n)) throw new TypeError("Cannot call a class as a function") } }, function (t, n, e) { "use strict"; function r(t) { return t && t.__esModule ? t : { default: t } } n.__esModule = !0; var u = e(1), i = r(u), o = e(5), a = r(o), f = e(4), c = r(f), l = e(6), s = r(l), E = e(7), p = r(E), h = e(8), R = r(h), _ = function () { function t(n, e) { (0, i.default)(this, t), this.cfg = n || {}, this.indentation = new s.default(this.cfg.indent), this.inlineBlock = new p.default, this.params = new R.default(this.cfg.params), this.tokenizer = e, this.previousReservedWord = {} } return t.prototype.format = function (t) { var n = this.tokenizer.tokenize(t), e = this.getFormattedQueryFromTokens(n); return e.trim() + "\n" }, t.prototype.getFormattedQueryFromTokens = function (t) { var n = this, e = ""; return t.forEach(function (r, u) { r.type !== c.default.WHITESPACE && (r.type === c.default.LINE_COMMENT ? e = n.formatLineComment(r, e) : r.type === c.default.BLOCK_COMMENT ? e = n.formatBlockComment(r, e) : r.type === c.default.RESERVED_TOPLEVEL ? (e = n.formatToplevelReservedWord(r, e), n.previousReservedWord = r) : r.type === c.default.RESERVED_NEWLINE ? (e = n.formatNewlineReservedWord(r, e), n.previousReservedWord = r) : r.type === c.default.RESERVED ? (e = n.formatWithSpaces(r, e), n.previousReservedWord = r) : e = r.type === c.default.OPEN_PAREN ? n.formatOpeningParentheses(t, u, e) : r.type === c.default.CLOSE_PAREN ? n.formatClosingParentheses(r, e) : r.type === c.default.PLACEHOLDER ? n.formatPlaceholder(r, e) : "," === r.value ? n.formatComma(r, e) : ":" === r.value ? n.formatWithSpaceAfter(r, e) : "." === r.value || ";" === r.value ? n.formatWithoutSpaces(r, e) : n.formatWithSpaces(r, e)) }), e }, t.prototype.formatLineComment = function (t, n) { return this.addNewline(n + t.value) }, t.prototype.formatBlockComment = function (t, n) { return this.addNewline(this.addNewline(n) + this.indentComment(t.value)) }, t.prototype.indentComment = function (t) { return t.replace(/\n/g, "\n" + this.indentation.getIndent()) }, t.prototype.formatToplevelReservedWord = function (t, n) { return this.indentation.decreaseTopLevel(), n = this.addNewline(n), this.indentation.increaseToplevel(), n += this.equalizeWhitespace(t.value), this.addNewline(n) }, t.prototype.formatNewlineReservedWord = function (t, n) { return this.addNewline(n) + this.equalizeWhitespace(t.value) + " " }, t.prototype.equalizeWhitespace = function (t) { return t.replace(/\s+/g, " ") }, t.prototype.formatOpeningParentheses = function (t, n, e) { var r = t[n - 1]; return r && r.type !== c.default.WHITESPACE && r.type !== c.default.OPEN_PAREN && (e = a.default.trimEnd(e)), e += t[n].value, this.inlineBlock.beginIfPossible(t, n), this.inlineBlock.isActive() || (this.indentation.increaseBlockLevel(), e = this.addNewline(e)), e }, t.prototype.formatClosingParentheses = function (t, n) { return this.inlineBlock.isActive() ? (this.inlineBlock.end(), this.formatWithSpaceAfter(t, n)) : (this.indentation.decreaseBlockLevel(), this.formatWithSpaces(t, this.addNewline(n))) }, t.prototype.formatPlaceholder = function (t, n) { return n + this.params.get(t) + " " }, t.prototype.formatComma = function (t, n) { return n = a.default.trimEnd(n) + t.value + " ", this.inlineBlock.isActive() ? n : /^LIMIT$/i.test(this.previousReservedWord.value) ? n : this.addNewline(n) }, t.prototype.formatWithSpaceAfter = function (t, n) { return a.default.trimEnd(n) + t.value + " " }, t.prototype.formatWithoutSpaces = function (t, n) { return a.default.trimEnd(n) + t.value }, t.prototype.formatWithSpaces = function (t, n) { return n + t.value + " " }, t.prototype.addNewline = function (t) { return a.default.trimEnd(t) + "\n" + this.indentation.getIndent() }, t }(); n.default = _, t.exports = n.default }, function (t, n, e) { "use strict"; function r(t) { return t && t.__esModule ? t : { default: t } } n.__esModule = !0; var u = e(1), i = r(u), o = e(5), a = r(o), f = e(4), c = r(f), l = function () { function t(n) { (0, i.default)(this, t), this.WHITESPACE_REGEX = /^(\s+)/, this.NUMBER_REGEX = /^((-\s*)?[0-9]+(\.[0-9]+)?|0x[0-9a-fA-F]+|0b[01]+)\b/, this.OPERATOR_REGEX = /^(!=|<>|==|<=|>=|!<|!>|\|\||::|->>|->|.)/, this.BLOCK_COMMENT_REGEX = /^(\/\*\*?(?:\*\/|$))/u, this.LINE_COMMENT_REGEX = this.createLineCommentRegex(n.lineCommentTypes), this.RESERVED_TOPLEVEL_REGEX = this.createReservedWordRegex(n.reservedToplevelWords), this.RESERVED_NEWLINE_REGEX = this.createReservedWordRegex(n.reservedNewlineWords), this.RESERVED_PLAIN_REGEX = this.createReservedWordRegex(n.reservedWords), this.WORD_REGEX = this.createWordRegex(n.specialWordChars), this.STRING_REGEX = this.createStringRegex(n.stringTypes), this.OPEN_PAREN_REGEX = this.createParenRegex(n.openParens), this.CLOSE_PAREN_REGEX = this.createParenRegex(n.closeParens), this.INDEXED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(n.indexedPlaceholderTypes, "[0-9]*"), this.IDENT_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(n.namedPlaceholderTypes, "[a-zA-Z0-9._$]+"), this.STRING_NAMED_PLACEHOLDER_REGEX = this.createPlaceholderRegex(n.namedPlaceholderTypes, this.createStringPattern(n.stringTypes)) } return t.prototype.createLineCommentRegex = function (t) { return RegExp("^((?:" + t.map(function (t) { return a.default.escapeRegExp(t) }).join("|") + ").*?(?:\n|$))") }, t.prototype.createReservedWordRegex = function (t) { var n = t.join("|").replace(/ /g, "\\s+"); return RegExp("^(" + n + ")\\b", "i") }, t.prototype.createWordRegex = function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : []; return RegExp("^([\\w" + t.join("") + "]+)") }, t.prototype.createStringRegex = function (t) { return RegExp("^(" + this.createStringPattern(t) + ")") }, t.prototype.createStringPattern = function (t) { var n = { "``": "((`[^`]*($|`))+)", "[]": "((\\[[^\\]]*($|\\]))(\\][^\\]]*($|\\]))*)", '""': '(("[^"\\\\]*(?:\\\\.[^"\\\\]*)*("|$))+)', "''": "(('[^'\\\\]*(?:\\\\.[^'\\\\]*)*('|$))+)", "N''": "((N'[^N'\\\\]*(?:\\\\.[^N'\\\\]*)*('|$))+)" }; return t.map(function (t) { return n[t] }).join("|") }, t.prototype.createParenRegex = function (t) { return RegExp("^(" + t.map(function (t) { return a.default.escapeRegExp(t) }).join("|") + ")") }, t.prototype.createPlaceholderRegex = function (t, n) { if (a.default.isEmpty(t)) return !1; var e = t.map(a.default.escapeRegExp).join("|"); return RegExp("^((?:" + e + ")(?:" + n + "))") }, t.prototype.tokenize = function (t) { for (var n = [], e = void 0; t.length;)e = this.getNextToken(t, e), t = t.substring(e.value.length), n.push(e); return n }, t.prototype.getNextToken = function (t, n) { return this.getWhitespaceToken(t) || this.getCommentToken(t) || this.getStringToken(t) || this.getOpenParenToken(t) || this.getCloseParenToken(t) || this.getPlaceholderToken(t) || this.getNumberToken(t) || this.getReservedWordToken(t, n) || this.getWordToken(t) || this.getOperatorToken(t) }, t.prototype.getWhitespac
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
一款方便、快捷的数据库文档查询、生成工具,支持SqlServer/Oracle/MySql/PostgreSQL/SQLite数据库表结构文档查询、生成;导出文档支持CHM、Word、Excel、PDF、Html、Xml、Json、MarkDown等多种格式。
资源推荐
资源详情
资源评论
收起资源包目录
一款方便、快捷的数据库文档查询、生成工具 (547个子文件)
packages.config 15KB
app.config 5KB
packages.config 3KB
app.config 3KB
app.config 1KB
SqlHelper.cs 148KB
SQLite.cs 138KB
TSqlStandardParser.cs 138KB
UcMainContent.xaml.cs 72KB
ExportDoc.xaml.cs 60KB
TSqlStandardFormatter.cs 52KB
SQLiteAsync.cs 48KB
Annotations.cs 47KB
UcMimeType.xaml.cs 46KB
TSqlStandardTokenizer.cs 42KB
SqlServerExporter.cs 29KB
UcMainColumns.xaml.cs 25KB
ParseTree.cs 22KB
WordDoc.cs 21KB
UcAddGroupObject.xaml.cs 21KB
UcAddTagObject.xaml.cs 21KB
TSqlObfuscatingFormatter.cs 21KB
PostgreSqlExporter.cs 16KB
ExcelDoc.cs 15KB
MySqlExporter.cs 15KB
PdfDoc.cs 15KB
TSqlIdentityFormatter.cs 14KB
GroupsView.xaml.cs 14KB
UcMainObjects.xaml.cs 13KB
SqlServerUC.xaml.cs 13KB
MySqlUC.xaml.cs 13KB
UcMainDbCompare.xaml.cs 12KB
OracleUC.xaml.cs 12KB
DmUC .xaml.cs 12KB
OracleExporter.cs 12KB
PostgreSqlUC.xaml.cs 12KB
ConnectManage.xaml.cs 11KB
MainWindow.xaml.cs 11KB
DmExporter.cs 11KB
TagsView.xaml.cs 10KB
SqliteUC.xaml.cs 10KB
ImportMark.xaml.cs 10KB
SetGroup.xaml.cs 10KB
BarQrCodeHelper.cs 9KB
ConfigUtils.cs 9KB
ChmDoc.cs 9KB
Extensions.cs 8KB
UcGroupObjects.xaml.cs 8KB
UcTagObjects.xaml.cs 8KB
Resources.Designer.cs 8KB
StrUtil.cs 8KB
TSqlStandardFormatterOptions.cs 8KB
SqlXmlConstants.cs 7KB
SetTag.xaml.cs 7KB
ConnectConfigs.cs 7KB
SqliteExporter.cs 7KB
GroupAddView.xaml.cs 7KB
TagAddView.xaml.cs 6KB
UcIcoToConvert.xaml.cs 6KB
UcMainW.xaml.cs 6KB
SQLiteHelper.cs 6KB
SqlServerDbTypeMapHelper.cs 6KB
UcTabCode.xaml.cs 6KB
UcWordCount.xaml.cs 6KB
ExportLoading.xaml.cs 6KB
TaskHelper.cs 5KB
UcToolMenu.xaml.cs 5KB
ConnectionStringUtil.cs 5KB
TreeNodeItem.cs 5KB
SoftReg.cs 5KB
UcUnixToConvert.xaml.cs 5KB
UcNPinYin.xaml.cs 5KB
SerializeHelper.cs 5KB
Column.cs 5KB
UcQrCode.xaml.cs 5KB
MarkDownDoc.cs 4KB
UcJWT.xaml.cs 4KB
Resource.Designer.cs 4KB
UcJsonFormatter.xaml.cs 4KB
HighlightingProvider.cs 4KB
JS.cs 4KB
Exporter.cs 4KB
UcUnicode.xaml.cs 4KB
UcHex.xaml.cs 4KB
UcStoryOfWords.xaml.cs 4KB
Doc.cs 4KB
ScriptWindow.xaml.cs 3KB
UcTextInsert.xaml.cs 3KB
SqlFormattingManager.cs 3KB
SqlScript.xaml.cs 3KB
Utils.cs 3KB
Loading.xaml.cs 3KB
ConnectMainUC.xaml.cs 3KB
RazorTpl.cs 3KB
About.xaml.cs 3KB
Resource.Designer.cs 3KB
Oops.cs 3KB
SettingWindow.xaml.cs 3KB
ConnectType.xaml.cs 3KB
App.xaml.cs 3KB
共 547 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6651
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 农村信用社联合社计算机信息系统投产与变更管理办.docx
- 农村信用社联合社计算机信息系统数据管理办法.docx
- 利用SPSS作临床效度分析线上计算网站介绍-医学研究部统计谘.(医学PPT课件).ppt
- 利用Zabbix监控mysqldump定时备份数据库状态.docx
- 利用计算机解决问题的基本过程.doc
- 化工铁路通信工程总结.doc
- 北京大学网络教育软件工程作业.docx
- 医药公司(连锁店)计算机操作规程未新系统的自行按照旧制修改-新系统过制的编号加修模版.doc
- 医药公司(连锁店)计算机系统操作规程模版.doc
- 医药连锁门店计算机系统的操作和管理程序未新系统的自行按照旧制修改-新系统过制的编号加修模版.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功