版本比对sql

弹窗  index

<template><el-dialogtitle="版本":visible.sync="dialogVisible"width="55%"center:close-on-click-modal="false":close-on-press-escape="false":before-close="beforeClose"@open="open"custom-class="dialogClass"><template v-slot:title><div>版本</div><el-buttonv-if="isShowVersion"style="position: absolute; top: 12px; right: 10%"type="primary" size="mini"@click="goVersionComparisonPage">版本对比</el-button></template><div v-loading="dialogLoading || dialogLoading2"><el-table:data="tableData"ref="Table"size="mini"empty-text="暂无数据":header-cell-style="headerCellStyle":cell-style="cellStyle":header-cell-class-name="cellClass":row-key="getRowKeys"@selection-change="selectionChange"style="width: 100%"><el-table-column v-if="isShowVersion" type="selection" width="55" :reserve-selection="true" :selectable="selectable"></el-table-column><el-table-column label="提交时间" width="160"><template slot-scope="scope">{{ scope.row.createdAt | formatDate }}</template></el-table-column><el-table-column label="提交人" prop="createdBy"></el-table-column><el-table-column label="变更内容" prop="modifyContent"><template slot-scope="scope"><el-tooltipeffect="dark"placement="top-start"v-if="!isOverflow(scope.row.modifyContent, scope.column.realWidth)"><div slot="content" style="white-space: pre-line">{{ scope.row.modifyContent }}</div><div class="ellipsis-container">{{ scope.row.modifyContent }}</div></el-tooltip><div v-else>{{ scope.row.modifyContent }}</div></template></el-table-column><el-table-column label="操作" width="100" v-if="!isShowVersion"><template slot-scope="scope"><el-buttontype="text"size="mini"@click="rollback(scope)":disabled="!disabledRollback">回滚</el-button></template></el-table-column><el-table-column label="操作" width="100" v-if="realTime == 'real'"><template slot-scope="scope"><el-buttontype="text"size="mini"@click="detailBack(scope)":disabled="!disabledRollback">详情</el-button><el-buttontype="text"size="mini"@click="rollback(scope)":disabled="!disabledRollback">回滚</el-button></template></el-table-column></el-table><div class="pagination" v-if="realTime !== 'real'"><el-pagination@size-change="handleSizeChange"@current-change="handleCurrentChange":current-page="currentPage":page-sizes="[10, 50, 100]":page-size="pageSize"layout="total, sizes, prev, pager, next, jumper":total="total"background></el-pagination></div></div><span slot="footer"><el-buttontype="primary"size="mini"@click="save":disabled="dialogLoading || dialogLoading2">确 定</el-button></span></el-dialog>
</template><script>
import { debounce, formatDate } from "@/utils/index.js";
import dataDevelopment from "@/components/pages/dataDevelopment/schedulinJobs/api/index";
import reatimeJobService from '@/components/pages/dataDevelopment/realtimeJob/api/index.js'export default {name: "versionsDialog",props: {sqlType: String,taskSqlCode: {type: String,default: "",},taskSqlName: {type: String,default: "",},dialogVisible: {type: Boolean,default: false,},dialogLoading: {type: Boolean,default: false,},taskCode: {type: String,default: "",},taskStatus: {type: String,default: "",},taskName: {type: String,default: "",},isShowVersion: {type: Boolean,default: false,},sqlStatus: {type: Boolean,default: false,},realTime: {type: String,default: "",},},filters: {formatDate,},data() {return {tableData: [],total: 0,currentPage: 1,pageSize: 10,dialogLoading2: false,multipleSelection: []};},computed: {disabledRollback() {if (this.sqlType) {return this.sqlStatus}return this.taskStatus === "1" || this.taskStatus === "0";},},methods: {/** 去除全选框 */cellClass(row) {//若是第一行,即全选框所在的那一行if (row.columnIndex === 0) {this.$nextTick(() => {// 每次触发 headerCell 判断如果是第一个 单元格 调用该方法// row.column.id 是该单元格的 class 样式// 通过 class 样式连续找两层 children 节点 如果存在 执行 remove()let selectBox = document.querySelector(`.${row.column.id}`);selectBox.children[0].children[0]?.remove();})}},/** 分页保持选择框 */getRowKeys(row) {return row.id;},/** 获取选中的数据 */selectionChange(list) {if (list.length > 2) {this.$refs.Table.clearSelection(); //用于多选表格,清空用户的选择for (let i = 0; i < 2; i++) {this.$refs.Table.toggleRowSelection(list[i]); //用于多选表格,切换某一行的选中状态,如果使用了第二个参数,则是设置这一行选中与否(selected 为 true 则选中)}return;}this.multipleSelection = [...list];},/** Checkbox是否禁用 */selectable(row) {let index = this.multipleSelection.findIndex((v) => v.id === row.id);return this.multipleSelection.length >= 2 ? index !== -1 ? true : false : true;},/** 跳转去版本对比页面 */goVersionComparisonPage() {const newList = this.multipleSelection.map(item => item.id);if (this.realTime == 'real') {this.$router.push({name: 'DetailComparison',query: {realTime: this.realTime,multipleSelection: JSON.stringify(newList),taskCode: this.taskSqlCode,taskName: this.taskSqlName}})} else {this.$router.push({name: 'versionComparison',query: {multipleSelection: JSON.stringify(newList),taskCode: this.taskCode,taskName: this.taskName}})}},/** 每页条数变更 */handleSizeChange(val) {this.pageSize = val;this.queryHistoryPage();},/** 当前页码变更 */handleCurrentChange(val) {this.currentPage = val;this.queryHistoryPage();},/** 回滚 */rollback: debounce(function ({ row }) {if (this.sqlType) {this.$confirm("当前未提交的内容将会被覆盖。","提示",{confirmButtonText: "确定",cancelButtonText: "取消",type: "warning",}).then(() => {this.$emit("realSqlback", row);}).catch(() => {});} else {this.$confirm("1. 当前未提交的内容将会被覆盖。2. 回滚后要“提交”才能生效。确定要回滚当前版本?","提示",{confirmButtonText: "确定",cancelButtonText: "取消",type: "warning",}).then(() => {this.$emit("rollback", row);}).catch(() => {});}}, 300),/** 版本详情 */async detailBack(row) {let params = {taskCode: this.taskSqlCode,versionId: row.row.id}let res = await reatimeJobService.getVersionDetail(params)let rowDetailif (res.data.success) {rowDetail = res.data?.result} else {this.$notification.error(res.data.errorMsg);}this.$router.push({name: 'DetailComparison',query: {...rowDetail}})},/** 弹框关闭 */beforeClose() {this.$emit("close");},/** 弹框打开 */open() {this.pageSize = 10;this.currentPage = 1;this.queryHistoryPage();this.$nextTick(() => {this.$refs.Table.clearSelection();})},/** 获取版本列表 */async queryHistoryPage() {try {this.dialogLoading2 = true;let taskCode = this.taskCode;let resif (this.sqlType) {let taskSqlCode = this.taskSqlCoderes = await reatimeJobService.getVersionList(taskSqlCode);} else {const params = {taskCode,pageSize: this.pageSize,pageNo: this.currentPage,};res = await dataDevelopment.queryHistoryPage(params);}if (res.data?.success) {const result = res.data.result;if (this.sqlType) {this.total = result?.length;this.tableData = resultthis.tableData =  this.tableData.map(item => {return {id: item.versionId,createdAt: item.submitTime,createdBy: item.submittedBy,modifyContent: item.content,}})} else {this.tableData = result.records;this.total = result.total;}} else {this.$notification.error(res.data.errorMsg);}} catch (error) {this.tableData = [];this.total = 0;console.error(error);} finally {this.dialogLoading2 = false;}},/** 确定 */save() {this.beforeClose();},// 表格居中cellStyle() {return "text-align: center;font-size: 12px;";},// 表格样式headerCellStyle() {return "text-align: center;color: #000000;";},/** 是否开启了隐藏 */isOverflow(text, width) {const el = document.createElement("span");el.innerHTML = text;document.body.appendChild(el);const flag = el.offsetWidth < width;document.body.removeChild(el);return flag;},},
};
</script><style lang="scss" scoped>
::v-deep .dialogClass {max-height: 78%;display: flex;flex-direction: column;.el-dialog__body {padding: 10px;flex: 1;overflow-y: auto;}
}
.pagination {display: flex;justify-content: flex-end;margin: 20px 10px;
}.ellipsis-container {overflow: hidden;white-space: nowrap;text-overflow: ellipsis;
}
</style>

sql编辑器

<template><div class="monaco"><div ref="container" class="monaco-editor" style="height: 400px"></div></div>
</template><script>
import * as monaco from "monaco-editor";
import sqlInfo from "./sql";export default {name: "Monaco",data() {return {// 编辑器对象monacoDiffInstance: null,}},methods: {init(event) {if (this.monacoDiffInstance) {this.monacoDiffInstance.dispose()}// 初始化container的内容,销毁之前生成的编辑器this.$refs.container.innerHTML = '';this.theme();this.registerSQL();if (event.realTime) {// 版本对比this.monacoDiffInstance = monaco.editor.createDiffEditor(this.$refs['container'], {value: '', // 编辑器的值theme: 'vs-dark', // 编辑器主题:vs, hc-black, or vs-dark,更多选择详见官网roundedSelection: false, // 右侧不显示编辑器预览框autoIndent: true, // 自动缩进readOnly: true,// language: 'json',automaticLayout: true // 自动布局});const { sourceTaskScript, targetTaskScript } = event;const originalModel = monaco.editor.createModel(sourceTaskScript, 'sql');const modifiedModel = monaco.editor.createModel(targetTaskScript, 'sql');this.monacoDiffInstance.setModel({// oldValue为以前的值original: originalModel,// oldValue为新的值modified: modifiedModel})} else {// 详情const sqlCode = event;// 初始化编辑器实例this.monacoDiffInstance = monaco.editor.create(this.$refs['container'], {value: sqlCode, // 编辑器的值language: 'sql', // 设置语言为 SQLtheme: 'vs-dark', // 编辑器主题readOnly: true,automaticLayout: true // 自动布局});}},//自定义主题theme() {monaco.editor.defineTheme('hiveTheme', {base: 'vs-dark',inherit: true,rules: [{ token: 'builtFunc', foreground: 'FF00FF' },//内置方法以及变量、伪列{ token: 'opera', foreground: '778899' }//运算符]})},registerSQL() {monaco.languages.register({ id: 'customSql' });monaco.languages.setMonarchTokensProvider('customSql', {ignoreCase: true,//关键字大小写都可高亮brackets: sqlInfo.brackets,keywords: sqlInfo.keywords,operators: sqlInfo.operators,builtinFunctions: sqlInfo.builtinFunctions,builtinVariables: sqlInfo.builtinVariables,pseudoColumns: sqlInfo.pseudoColumns,tokenizer: sqlInfo.tokenizer})}}}
</script><style scoped>
</style>

filter

<template><div class="filter-item"><div><div class="task-desc">任务:{{ taskName }}</div><div class="form-box"><el-form class="source-form" ref="sourceForm" :model="sourceForm" label-width="80px" size="mini"><el-form-item label="版本:" v-if="this.$route.query.realTime == 'real'"><el-select v-model="sourceForm.version"placeholder="请选择版本"filterable:loading="loading"@change="getCodeCompareScript('source')"><el-option v-for="v in sourceVersionList" :label="v.createdAt" :value="v.id" :key="v.id"></el-option></el-select></el-form-item><el-form-item label="版本:" v-else><el-select v-model="sourceForm.version"placeholder="请选择版本"filterabledisabled:loading="loading"@change="getCodeCompareScript('source')"><el-option v-for="v in sourceVersionList" :label="v.createdAt" :value="v.id" :key="v.id"></el-option></el-select></el-form-item><el-form-item label="提交人:">{{ sourceForm.createdBy  }}</el-form-item><el-form-item label="提交时间:">{{ sourceForm.createdAt }}</el-form-item></el-form><div v-if="this.$route.query.realTime == 'real'"><el-divider direction="vertical" class="vertical-form"></el-divider><el-form class="target-form" ref="targetForm" :model="targetForm" label-width="80px" size="mini"><el-form-item label="版本:"><el-select v-model="targetForm.version" placeholder="请选择版本" @change="getCodeCompareScript('target')"><el-option v-for="v in sourceVersionList" :label="v.createdAt" :value="v.id" :key="v.id"></el-option></el-select></el-form-item><el-form-item label="提交人:">{{ targetForm.createdBy }}</el-form-item><el-form-item label="提交时间:">{{ targetForm.createdAt }}</el-form-item></el-form></div></div></div></div>
</template><script>
import dayjs from "dayjs";
import {DateFormatEnum} from "@/modal/public-enum";
import reatimeJobService from "../../../realtimeJob/api";export default {name: "FilterItems",data() {return {sourceForm: {version: '',createdAt: '',createdBy: ''},targetForm: {version: '',createdAt: '',createdBy: ''},sourceVersionList: [],taskCode: '',taskName: '',pageSize: 100,currentPage: 1,multipleSelection: [],loading: false}},mounted() {if (this.$route.query.realTime == 'real') {this.multipleSelection = JSON.parse(this.$route.query.multipleSelection);this.taskCode = this.$route.query.taskCode;this.taskName = this.$route.query.taskName;this.queryHistoryPage();} else {this.sourceForm = this.$route.querythis.sourceForm.version = this.createAt(this.$route.query.createAt)this.sourceForm.createdAt = this.createAt(this.$route.query.createAt)this.sourceForm.createdBy = this.$route.query.createBy || '--'this.getCodeCompareScript()}},methods: {createAt(val) {return dayjs(Number(val)).format(DateFormatEnum.DATETIME_FORM)},/** 获取版本列表 */async queryHistoryPage() {this.loading = true;try {const params = {taskCode: this.taskCode,pageSize: this.pageSize,pageNo: this.currentPage,};console.log(this.$route.query);const res = await reatimeJobService.getVersionList(params.taskCode);if (res.data?.success) {const result = res.data.result;if (result.length > 0) {this.sourceVersionList = result.map(item => {return {...item,id: item.versionId,createdAt: dayjs(item.submitTime).format(DateFormatEnum.DATETIME_FORM),}});if (this.multipleSelection.length === 0) {const {  id } = this.sourceVersionList[0];this.sourceForm.version = id;this.getCodeCompareScript('source');return;}if (this.multipleSelection[0]) {const { id } = this.setDefaultVersion(this.multipleSelection[0]);this.sourceForm.version = id;this.getCodeCompareScript('source');}if (this.multipleSelection[1]) {const { id } = this.setDefaultVersion(this.multipleSelection[1]);this.targetForm.version = id;this.getCodeCompareScript();}}} else {this.$notification.error(res.data.errorMsg);}} catch (error) {this.sourceVersionList = [];this.total = 0;} finally {this.loading = false;}},/*** 设置默认版本*/setDefaultVersion(val) {return this.sourceVersionList.find(item => item.id === val);},/*** 版本对比*/getCodeCompareScript(type) {if (this.$route.query.realTime == 'real') {const sourceItem = this.setDefaultVersion(this.sourceForm.version);const targetItem = this.setDefaultVersion(this.targetForm.version);this.$emit('codeCompare', {sourceTaskScript: sourceItem.script,targetTaskScript: targetItem ? targetItem.script : null,realTime: this.$route.query.realTime})if (type === 'source') {this.sourceForm.createdBy = sourceItem.submittedBy;this.sourceForm.createdAt = dayjs(sourceItem.submitTime).format(DateFormatEnum.DATETIME_FORM)} else {this.targetForm.createdBy = targetItem.submittedBy;this.targetForm.createdAt = dayjs(targetItem.submitTime).format(DateFormatEnum.DATETIME_FORM)}} else {const sourceItem = this.sourceForm;this.$emit('codeCompare', sourceItem.script)this.sourceForm.createdBy = sourceItem.createdBy;this.sourceForm.createdAt = sourceItem.createdAt;}}}
}
</script><style scoped lang="scss">
.filter-item {.form-box {display: flex;.source-form, target-form {width: 49%;}.target-form {padding-left: 12px;}}.task-desc {margin-bottom: 12px;}
}
</style>

task

<template><div class="task"><FilterItems @codeCompare="codeCompare"></FilterItems><el-tabs v-model="activeName" ><el-tab-pane label="代码" name="code"><Monaco ref="MonacoRef"></Monaco></el-tab-pane></el-tabs></div>
</template><script>
import FilterItems from '../FilterItems/FilterItems'
import Monaco from "./components/Monaco/Monaco";export default {name: "task",components: { FilterItems, Monaco },data() {return {activeName: 'code',}},mounted() {},methods: {codeCompare(event) {this.$refs.MonacoRef.init(event);}}
}
</script><style scoped lang="scss">
.task {.form-box {display: flex;.source-form, target-form {width: 49%;}.target-form {padding-left: 12px;}}.task-desc {margin-bottom: 12px;text-align: center;}
}
</style>

sql

const sqlInfo = {//括号brackets:[{ open: '[', close: ']', token: 'delimiter.square' },{ open: '(', close: ')', token: 'delimiter.parenthesis' }],//关键字keywords:[//Non-reserved Keywords//1.2.0'ADD','ADMIN','AFTER','ANALYZE','ARCHIVE','ASC','BEFORE','BUCKET','BUCKETS','CASCADE','CHANGE','CLUSTER','CLUSTERED','CLUSTERSTATUS','COLLECTION','COLUMNS','COMMENT','COMPACT','COMPACTIONS','COMPUTE','CONCATENATE','CONTINUE','DATA','DATABASES','DATETIME','DAY','DBPROPERTIES','DEFERRED','DEFINED','DELIMITED','DEPENDENCY','DESC','DIRECTORIES','DIRECTORY','DISABLE','DISTRIBUTE','ELEM_TYPE','ENABLE','ESCAPED','EXCLUSIVE','EXPLAIN', 'EXPORT', 'FIELDS', 'FILE','FILEFORMAT','FIRST','FORMAT','FORMATTED','FUNCTIONS','HOLD_DDLTIME','HOUR','IDXPROPERTIES','IGNORE','INDEX','INDEXES','INPATH','INPUTDRIVER','INPUTFORMAT','ITEMS','JAR','KEYS','KEY_TYPE','LIMIT','LINES','LOAD','LOCATION','LOCK','LOCKS','LOGICAL','LONG','MAPJOIN','MATERIALIZED','METADATA','MINUS','MINUTE','MONTH','MSCK','NOSCAN','NO_DROP', 'OFFLINE','OPTION','OUTPUTDRIVER', 'OUTPUTFORMAT','OVERWRITE', 'OWNER', 'PARTITIONED', 'PARTITIONS', 'PLUS', 'PRETTY','PRINCIPALS', 'PROTECTION', 'PURGE', 'READ', 'READONLY', 'REBUILD','RECORDREADER', 'RECORDWRITER', 'REGEXP', 'RELOAD', 'RENAME','REPAIR', 'REPLACE', 'REPLICATION', 'RESTRICT', 'REWRITE', 'RLIKE','ROLE', 'ROLES', 'SCHEMA', 'SCHEMAS', 'SECOND', 'SEMI', 'SERDE','SERDEPROPERTIES', 'SERVER', 'SETS', 'SHARED', 'SHOW', 'SHOW_DATABASE','SKEWED', 'SORT', 'SORTED', 'SSL', 'STATISTICS', 'STORED', 'STREAMTABLE','STRING', 'STRUCT', 'TABLES', 'TBLPROPERTIES', 'TEMPORARY', 'TERMINATED','TINYINT', 'TOUCH', 'TRANSACTIONS', 'UNARCHIVE', 'UNDO', 'UNIONTYPE','UNLOCK', 'UNSET', 'UNSIGNED', 'URI', 'USE', 'UTC', 'UTCTIMESTAMP','VALUE_TYPE', 'VIEW', 'WHILE', 'YEAR',//2.0.0 add  remove:REGEXP, RLIKE'AUTOCOMMIT','ISOLATION', 'LEVEL', 'OFFSET', 'SNAPSHOT', 'TRANSACTION', 'WORK', 'WRITE',//2.1.0 add'ABORT', 'KEY', 'LAST', 'NORELY', 'NOVALIDATE', 'NULLS', 'RELY', 'VALIDATE',//2.2.0 add'DETAIL', 'DOW', 'EXPRESSION', 'OPERATOR', 'QUARTER', 'SUMMARY', 'VECTORIZATION', 'WEEK', 'YEARS', 'MONTHS', 'WEEKS', 'DAYS', 'HOURS', 'MINUTES', 'SECONDS',//3.0.0 add'TIMESTAMPTZ', 'ZONE',//Reserved Keywords//2.0.0 add'COMMIT', 'ONLY', 'REGEXP', 'RLIKE', 'ROLLBACK', 'START',//2.1.0 add'CACHE', 'CONSTRAINT', 'FOREIGN', 'PRIMARY', 'REFERENCES',//2.2.0 add'DAYOFWEEK', 'EXTRACT', 'FLOOR', 'INTEGER', 'PRECISION', 'VIEWS',//3.0.0 add'TIME', 'NUMERIC', 'SYNC',//1.2.0'ALL', 'ALTER', 'AND', 'ARRAY', 'AS', 'AUTHORIZATION', 'BETWEEN','BIGINT', 'BINARY', 'BOOLEAN', 'BOTH', 'BY', 'CASE', 'CAST', 'CHAR','COLUMN', 'CONF', 'CREATE', 'CROSS', 'CUBE', 'CURRENT', 'CURRENT_DATE','CURRENT_TIMESTAMP', 'CURSOR', 'DATABASE', 'DATE', 'DECIMAL', 'DELETE','DESCRIBE', 'DISTINCT', 'DOUBLE', 'DROP', 'ELSE', 'END', 'EXCHANGE','EXISTS', 'EXTENDED', 'EXTERNAL', 'FALSE', 'FETCH', 'FLOAT', 'FOLLOWING','FOR', 'FROM', 'FULL', 'FUNCTION', 'GRANT', 'GROUP', 'GROUPING','HAVING', 'IF', 'IMPORT', 'IN', 'INNER', 'INSERT', 'INT', 'INTERSECT','INTERVAL', 'INTO', 'IS', 'JOIN', 'LATERAL', 'LEFT', 'LESS', 'LIKE','LOCAL', 'MACRO', 'MAP', 'MORE', 'NONE', 'NOT', 'NULL', 'OF', 'ON','OR', 'ORDER', 'OUT', 'OUTER', 'OVER', 'PARTIALSCAN', 'PARTITION','PERCENT', 'PRECEDING', 'PRESERVE', 'PROCEDURE', 'RANGE', 'READS','REDUCE', 'REVOKE', 'RIGHT', 'ROLLUP', 'ROW', 'ROWS', 'SELECT','SET', 'SMALLINT', 'TABLE', 'TABLESAMPLE', 'THEN', 'TIMESTAMP', 'TO','TRANSFORM', 'TRIGGER', 'TRUE', 'TRUNCATE', 'UNBOUNDED', 'UNION','UNIQUEJOIN', 'UPDATE', 'USER', 'USING', 'UTC_TMESTAMP', 'VALUES','VARCHAR', 'WHEN', 'WHERE', 'WINDOW', 'WITH'],//运算符operators:['DIV',// Logical'ALL', 'AND', 'ANY', 'BETWEEN', 'EXISTS', 'IN', 'LIKE', 'NOT', 'OR', 'SOME',// Set'EXCEPT', 'INTERSECT', 'UNION',// Join'APPLY', 'CROSS', 'FULL', 'INNER', 'JOIN', 'LEFT', 'OUTER', 'RIGHT',// Predicates'CONTAINS', 'FREETEXT', 'IS', 'NULL',// Pivoting'PIVOT', 'UNPIVOT',// Merging'MATCHED'],//内置方法builtinFunctions:[//Complex Type Constructors'MAP','STRUCT','NAMED_STRUCT','ARRAY','CREATE_UNION',//Mathematical Functions'BROUND','CEIL','IN','ln','LOG2','POW','BIN','HEX','UNHEX','CONV','POSITIVE','PMOD','NEGATIVE','E','FACTORIAL','CBRT','SHIFTLEFT','SHIFTRIGHT','SHIFTRIGHTUNSIGNED','GREATEST','LEAST','WIDTH_BUCKET',//Collection Functions'SIZE','MAP_KEYS','MAP_VALUES','ARRAY_CONTAINS','SORT_ARRAY',//Type Conversion Functions'BINARY',//Date Functions'FROM_UNIXTIME','UNIX_TIMESTAMP','TO_DATE','QUARTER','HOUR','MINUTE','SECOND','WEEKOFYEAR','EXTRACT','DATE_ADD','DATE_SUB','FROM_UTC_TIMESTAMP','TO_UTC_TIMESTAMP','CURRENT_DATE','ADD_MONTHS','LAST_DAY','NEXT_DAY','TRUNC','MONTHS_BETWEEN','DATE_FORMAT',//Conditional Functions'IF','ISNOTNULL','NVL','ASSERT_TRUE',//String Functions'BASE64','CHARACTER_LENGTH','CHR','CONTEXT_NGRAMS','CONCAT_WS','DECODE','ELT','ENCODE','FIELD','FIND_IN_SET','FORMAT_NUMBER','GET_JSON_OBJECT','IN_FILE','INSTR','LENGTH','LOCATE','LPAD','NGRAMS','OCTET_LENGTH','PARSE_URL','PRINTF','QUOTE','REGEXP_EXTRACT','REGEXP_REPLACE','REPEAT','RPAD','SENTENCES','SPLIT','STR_TO_MAP','SUBSTR','SUBSTRING_INDEX','TRANSLATE','TRIM','UNBASE64','INITCAP','LEVENSHTEIN',//Data Masking Functions'MASK','MASK_FIRST_N','MASK_LAST_N','MASK_SHOW_FIRST_N','MASK_SHOW_LAST_N','MASK_HASH',//Misc. Functions'JAVA_METHOD','REFLECT','HASH','LOGGED_IN_USER','CURRENT_DATABASE','MD5','SHA1','SHA','CRC32','SHA2','AES_ENCRYPT','AES_DECRYPT','SURROGATE_KEY','VERSION',//Built-in Aggregate Functions (UDAF)'VARIANCE','VAR_SAMP','STDDEV_POP','STDDEV_SAMP','COVAR_POP','COVAR_SAMP','CORR','PERCENTILE','PERCENTILE_APPROX','REGR_AVGX','REGR_AVGY','REGR_COUNT','REGR_INTERCEPT','REGR_R2','REGR_SLOPE','REGR_SXX','REGR_SXY','REGR_SYY','HISTOGRAM_NUMERIC','COLLECT_SET','COLLECT_LIST',//Built-in Table-Generating Functions (UDTF)'EXPLODE','POSEXPLODE','INLINE','STACK','JSON_TUPLE','PARSE_URL_TUPLE',// Aggregate'AVG', 'CHECKSUM_AGG', 'COUNT', 'COUNT_BIG', 'GROUPING', 'GROUPING_ID', 'MAX', 'MIN', 'SUM', 'STDEV', 'STDEVP', 'VAR', 'VARP',// Analytic'CUME_DIST', 'FIRST_VALUE', 'LAG', 'LAST_VALUE', 'LEAD', 'PERCENTILE_CONT', 'PERCENTILE_DISC', 'PERCENT_RANK',// Collation'COLLATE', 'COLLATIONPROPERTY', 'TERTIARY_WEIGHTS',// Azure'FEDERATION_FILTERING_VALUE',// Conversion'CAST', 'CONVERT', 'PARSE', 'TRY_CAST', 'TRY_CONVERT', 'TRY_PARSE',// Cryptographic'ASYMKEY_ID', 'ASYMKEYPROPERTY', 'CERTPROPERTY', 'CERT_ID', 'CRYPT_GEN_RANDOM','DECRYPTBYASYMKEY', 'DECRYPTBYCERT', 'DECRYPTBYKEY', 'DECRYPTBYKEYAUTOASYMKEY', 'DECRYPTBYKEYAUTOCERT', 'DECRYPTBYPASSPHRASE','ENCRYPTBYASYMKEY', 'ENCRYPTBYCERT', 'ENCRYPTBYKEY', 'ENCRYPTBYPASSPHRASE', 'HASHBYTES', 'IS_OBJECTSIGNED','KEY_GUID', 'KEY_ID', 'KEY_NAME', 'SIGNBYASYMKEY', 'SIGNBYCERT', 'SYMKEYPROPERTY', 'VERIFYSIGNEDBYCERT', 'VERIFYSIGNEDBYASYMKEY',// Cursor'CURSOR_STATUS',// Datatype'DATALENGTH', 'IDENT_CURRENT', 'IDENT_INCR', 'IDENT_SEED', 'IDENTITY', 'SQL_VARIANT_PROPERTY',// Datetime'CURRENT_TIMESTAMP', 'DATEADD', 'DATEDIFF', 'DATEFROMPARTS', 'DATENAME', 'DATEPART', 'DATETIME2FROMPARTS', 'DATETIMEFROMPARTS','DATETIMEOFFSETFROMPARTS', 'DAY', 'EOMONTH', 'GETDATE', 'GETUTCDATE', 'ISDATE', 'MONTH', 'SMALLDATETIMEFROMPARTS', 'SWITCHOFFSET','SYSDATETIME', 'SYSDATETIMEOFFSET', 'SYSUTCDATETIME', 'TIMEFROMPARTS', 'TODATETIMEOFFSET', 'YEAR',// Logical'CHOOSE', 'COALESCE', 'IIF', 'NULLIF',// Mathematical'ABS', 'ACOS', 'ASIN', 'ATAN', 'ATN2', 'CEILING', 'COS', 'COT', 'DEGREES', 'EXP', 'FLOOR', 'LOG', 'LOG10','PI', 'POWER', 'RADIANS', 'RAND', 'ROUND', 'SIGN', 'SIN', 'SQRT', 'SQUARE', 'TAN',// Metadata'APP_NAME', 'APPLOCK_MODE', 'APPLOCK_TEST', 'ASSEMBLYPROPERTY', 'COL_LENGTH', 'COL_NAME', 'COLUMNPROPERTY','DATABASE_PRINCIPAL_ID', 'DATABASEPROPERTYEX', 'DB_ID', 'DB_NAME', 'FILE_ID', 'FILE_IDEX', 'FILE_NAME', 'FILEGROUP_ID','FILEGROUP_NAME', 'FILEGROUPPROPERTY', 'FILEPROPERTY', 'FULLTEXTCATALOGPROPERTY', 'FULLTEXTSERVICEPROPERTY','INDEX_COL', 'INDEXKEY_PROPERTY', 'INDEXPROPERTY', 'OBJECT_DEFINITION', 'OBJECT_ID','OBJECT_NAME', 'OBJECT_SCHEMA_NAME', 'OBJECTPROPERTY', 'OBJECTPROPERTYEX', 'ORIGINAL_DB_NAME', 'PARSENAME','SCHEMA_ID', 'SCHEMA_NAME', 'SCOPE_IDENTITY', 'SERVERPROPERTY', 'STATS_DATE', 'TYPE_ID', 'TYPE_NAME', 'TYPEPROPERTY',// Ranking'DENSE_RANK', 'NTILE', 'RANK', 'ROW_NUMBER',// Replication'PUBLISHINGSERVERNAME',// Rowset'OPENDATASOURCE', 'OPENQUERY', 'OPENROWSET', 'OPENXML',// Security'CERTENCODED', 'CERTPRIVATEKEY', 'CURRENT_USER', 'HAS_DBACCESS', 'HAS_PERMS_BY_NAME', 'IS_MEMBER', 'IS_ROLEMEMBER', 'IS_SRVROLEMEMBER','LOGINPROPERTY', 'ORIGINAL_LOGIN', 'PERMISSIONS', 'PWDENCRYPT', 'PWDCOMPARE', 'SESSION_USER', 'SESSIONPROPERTY', 'SUSER_ID', 'SUSER_NAME','SUSER_SID', 'SUSER_SNAME', 'SYSTEM_USER', 'USER', 'USER_ID', 'USER_NAME',// String'ASCII', 'CHAR', 'CHARINDEX', 'CONCAT', 'DIFFERENCE', 'FORMAT', 'LEFT', 'LEN', 'LOWER', 'LTRIM', 'NCHAR', 'PATINDEX','QUOTENAME', 'REPLACE', 'REPLICATE', 'REVERSE', 'RIGHT', 'RTRIM', 'SOUNDEX', 'SPACE', 'STR', 'STUFF', 'SUBSTRING', 'UNICODE', 'UPPER',// System'BINARY_CHECKSUM', 'CHECKSUM', 'CONNECTIONPROPERTY', 'CONTEXT_INFO', 'CURRENT_REQUEST_ID', 'ERROR_LINE', 'ERROR_NUMBER', 'ERROR_MESSAGE','ERROR_PROCEDURE', 'ERROR_SEVERITY', 'ERROR_STATE', 'FORMATMESSAGE', 'GETANSINULL', 'GET_FILESTREAM_TRANSACTION_CONTEXT', 'HOST_ID','HOST_NAME', 'ISNULL', 'ISNUMERIC', 'MIN_ACTIVE_ROWVERSION', 'NEWID', 'NEWSEQUENTIALID', 'ROWCOUNT_BIG', 'XACT_STATE',// TextImage'TEXTPTR', 'TEXTVALID',// Trigger'COLUMNS_UPDATED', 'EVENTDATA', 'TRIGGER_NESTLEVEL', 'UPDATE',// ChangeTracking'CHANGETABLE', 'CHANGE_TRACKING_CONTEXT', 'CHANGE_TRACKING_CURRENT_VERSION', 'CHANGE_TRACKING_IS_COLUMN_IN_MASK', 'CHANGE_TRACKING_MIN_VALID_VERSION',// FullTextSearch'CONTAINSTABLE', 'FREETEXTTABLE',// SemanticTextSearch'SEMANTICKEYPHRASETABLE', 'SEMANTICSIMILARITYDETAILSTABLE', 'SEMANTICSIMILARITYTABLE',// FileStream'FILETABLEROOTPATH', 'GETFILENAMESPACEPATH', 'GETPATHLOCATOR', 'PATHNAME',// ServiceBroker'GET_TRANSMISSION_STATUS',//SPARK SQL FN'ACOSH','AGGREGATE','APPROX_COUNT_DISTINCT','APPROX_PRECENTILE','ARRAY_DISTINCT','ARRAY_EXCEPT','ARRAY_INTERSECT','ARRAY_JOIN','ARRAY_MAX','ARRAY_MIN','ARRAY_POSITION','ARRAY_REMOVE','ARRAY_REPEAT','ARRAY_SORT','ARRAY_UNION','ARRAYS_OVERLAP','ARRAYS_ZIP','SAINH','ATANH','ATAN2','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','BOOL_AND','BOOL_OR','CARDINALITY','CHAR_LENGTH','COSH','COUNT_IF','COUNT_MIN_SKETCH','DATE_PART','DATE_TRUNC','DATEOFMONTH','DATEOFYEAR','ELEMENT_AT','EVERY','EXPLODE_OUTER','EXPM1','FILTER','FLATTEN','FORALL','FORMAT_STRING','FROM_CSV','FROM_JSON','GROUPING','GROUPING_ID','HYPOT','IFNULL','INLINE_OUTER','INPUT_FILR_BLOCK_LENGTH','INPUT_FILR_BLOCK_START','INPUT_FILR_NAME','ISNAN','KURTOSIS','LCASE','LOG1P','IPAD','ITRIM','MAKE_DATE','MAKE_INTERVAL','MAKE_TIMESTAMP','MAP_CONCAT','MAP_ENTRIES','MAP_FROM_ARRAYS','MAP_FROM_ENTRIES','MAP_ZIP_WITH','MAX_BY','MEAN','MIN_BY','MOD','MONOTONICALLY_INCREASING_ID','NANVL','NOW','NVL2','OVERLAY','POSEXPLODE_OUTER','POSITION','RANDN','RANDOM','RINT','SCHEMA_OF_CSV','SCHEMA_OF_JSON','SEQUENCE','SHUFFLE','SIGNUM','SINH','SKEWNESS','SLICE','SPARK_PARTITION_ID','STD','TANH','TO_CSV','TO_JSON','TO_TIMESTAMP','TO_UBIX_TIMESTAMP','TYPEOF','UCASE','UUID','WEEKDAY','XPATH','XPATH_BOOLEAN','XPATH_DOUBEL','XPATH_FLOAT','XPATH_INT','XPATH_LONG','XPATH_NUMBER','XPATH_SHORT','XPATH_STRING','XXHASH64','ZIP_WITH'],//内置变量builtinVariables:[// Configuration'@@DATEFIRST', '@@DBTS', '@@LANGID', '@@LANGUAGE', '@@LOCK_TIMEOUT', '@@MAX_CONNECTIONS', '@@MAX_PRECISION', '@@NESTLEVEL','@@OPTIONS', '@@REMSERVER', '@@SERVERNAME', '@@SERVICENAME', '@@SPID', '@@TEXTSIZE', '@@VERSION',// Cursor'@@CURSOR_ROWS', '@@FETCH_STATUS',// Datetime'@@DATEFIRST',// Metadata'@@PROCID',// System'@@ERROR', '@@IDENTITY', '@@ROWCOUNT', '@@TRANCOUNT',// Stats'@@CONNECTIONS', '@@CPU_BUSY', '@@IDLE', '@@IO_BUSY', '@@PACKET_ERRORS', '@@PACK_RECEIVED', '@@PACK_SENT','@@TIMETICKS', '@@TOTAL_ERRORS', '@@TOTAL_READ', '@@TOTAL_WRITE'],//伪列pseudoColumns: ['$ACTION', '$IDENTITY', '$ROWGUID', '$PARTITION'],tokenizer: {root: [{ include: '@comments' },{ include: '@whitespace' },{ include: '@pseudoColumns' },{ include: '@numbers' },{ include: '@strings' },{ include: '@complexIdentifiers' },{ include: '@scopes' },[/[;,.]/, 'delimiter'],[/[()]/, '@brackets'],[/[\w@#$]+/, {cases: {'@keywords': 'keyword','@operators': 'opera','@builtinVariables': 'builtFunc','@builtinFunctions': 'builtFunc','@default': 'identifier'}}],[/[<>=!%&+\-*/|~^]/, 'opera'],],whitespace: [[/\s+/, 'white']],comments: [[/--+.*/, 'comment'],[/\/\*/, { token: 'comment.quote', next: '@comment' }]],comment: [[/[^*/]+/, 'comment'],[/\*\//, { token: 'comment.quote', next: '@pop' }],[/./, 'comment']],pseudoColumns: [[/[$][A-Za-z_][\w@#$]*/, {cases: {'@pseudoColumns': 'builtFunc','@default': 'identifier'}}],],numbers: [[/0[xX][0-9a-fA-F]*/, 'number'],[/[$][+-]*\d*(\.\d*)?/, 'number'],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/, 'number']],strings: [[/N'/, { token: 'string', next: '@string' }],[/'/, { token: 'string', next: '@string' }]],string: [[/[^']+/, 'string'],[/''/, 'string'],[/'/, { token: 'string', next: '@pop' }]],complexIdentifiers: [[/\[/, { token: 'identifier.quote', next: '@bracketedIdentifier' }],[/"/, { token: 'identifier.quote', next: '@quotedIdentifier' }]],bracketedIdentifier: [[/[^\]]+/, 'identifier'],[/]]/, 'identifier'],[/]/, { token: 'identifier.quote', next: '@pop' }]],quotedIdentifier: [[/[^"]+/, 'identifier'],[/""/, 'identifier'],[/"/, { token: 'identifier.quote', next: '@pop' }]],scopes: [[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i, 'keyword'],[/BEGIN\s+TRY\b/i, { token: 'keyword.try' }],[/END\s+TRY\b/i, { token: 'keyword.try' }],[/BEGIN\s+CATCH\b/i, { token: 'keyword.catch' }],[/END\s+CATCH\b/i, { token: 'keyword.catch' }],[/(BEGIN|CASE)\b/i, { token: 'keyword.block' }],[/END\b/i, { token: 'keyword.block' }],[/WHEN\b/i, { token: 'keyword.choice' }],[/THEN\b/i, { token: 'keyword.choice' }]]}
}
export default sqlInfo

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/web/4474.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【Linux网络】DHCP原理与配置

目录 一、DHCP工作原理 1.了解DHCP服务 2.使用DHCP的好处 3.DHCP的分配方式 二、DHCP的租约过程 三、DHCP场景应用实验 一、DHCP工作原理 1.了解DHCP服务 DHCP&#xff08;Dynamic Host Configuration Protocol&#xff0c;动态主机配置协议&#xff09; 由Internet工作…

【MyBatis】使用MyBatis框架在两张表是一对多的情况下,进行分步查询,发现对查询出来的结果进行封装时没有将实体类的id进行赋值

Catalog MyBatis在两张表是一对多的情况下,进行分步查询&#xff0c;发现对查询出来的结果进行封装时没有将实体类的id进行赋值1. 表结构2. 场景3. 实现方式具体步骤 4 .测试5. 解决方法 MyBatis在两张表是一对多的情况下,进行分步查询&#xff0c;发现对查询出来的结果进行封装…

企业工厂如何逆风翻盘:VR全景打破多重桎梏

现阶段&#xff0c;制造业工厂面临的困境&#xff0c;就是用着上百万的设备&#xff0c;却赚着几毛钱的利润。传统的工厂参观方式也存在着很多的局限性&#xff0c;例如时间上不方便、不能实地参访、生产线具有隐患等&#xff0c;都会使得参观者不能深入地了解工厂的生产环境和…

Python初级笔记6 函数

函数概念 函数是一段具有特定功能的代码的集合。函数的目的主要在于降低编程难度与增加代码复用。一组语句等价于一个函数&#xff0c;&#xff0c;需要使用这组语句的地方直接调用函数名即可。函数的定义也叫函数的声明&#xff0c;定义后的函数不能直接运行需要通过调用 函数…

《苍穹外卖》Day12部分知识点记录——数据统计-Excel报表

一、工作台 需求分析和设计 接口设计 今日数据接口订单管理接口菜品总览接口套餐总览接口订单搜索&#xff08;已完成&#xff09;各个状态的订单数量统计&#xff08;已完成&#xff09; 代码实现 今日数据接口 1. WorkspaceController 注意不要导错包了 package com.sk…

【经典算法】LeetCode104二叉树的最大深度(Java/C/Python3实现含注释说明,Easy)

目录 题目描述思路及实现方式一&#xff1a;递归思路代码实现Java版本C语言版本Python3版本Go语言版本 复杂度分析 方式二&#xff1a;广度优先搜索(BFS)思路代码实现Java版本C语言版本Python3版本 复杂度分析 总结相似题目 标签(题目类型)&#xff1a;树、深度优先搜索(DFS)、…

正点原子[第二期]Linux之ARM(MX6U)裸机篇学习笔记-6.5

前言&#xff1a; 本文是根据哔哩哔哩网站上“正点原子[第二期]Linux之ARM&#xff08;MX6U&#xff09;裸机篇”视频的学习笔记&#xff0c;在这里会记录下正点原子 I.MX6ULL 开发板的配套视频教程所作的实验和学习笔记内容。本文大量引用了正点原子教学视频和链接中的内容。…

多进程编程:原理、技术与应用

title: 多进程编程&#xff1a;原理、技术与应用 date: 2024/4/26 12:14:47 updated: 2024/4/26 12:14:47 categories: 后端开发 tags: 多进程并发编程网络服务分布式系统任务处理进程池线程对比 第一章&#xff1a;进程与线程 进程与线程的概念及区别&#xff1a; 进程&am…

gitcode 上传文件报错文件太大has exceeded the upper limited size

报错 remote: Start Git Hooks Checking Error: Deny by project hooks setting ‘default’ has exceeded the upper limited size (10 MB) in commit 当前有效的解决方案 项目设置->提交设置->勾选管理员不受规则限制->提交 重新push&#xff0c;提交成功

Vitis HLS 学习笔记--IDE软件高效操作指引

目录 1. 简介 2. 实用软件操作 2.1 C/RTL Cosimulation 选项 2.2 Do not show this dialog again 2.3 New Solution 2.4 对比 Solution 2.5 以命令行方式运行&#xff08;windows&#xff09; 2.6 文本缩放快捷键 2.7 查看和修改快捷键 2.8 将Vitis HLS RTL 导入 Viv…

Oracle集群ORA-03113:end-of-file on communication channel

一、问题场景描述 今天Oracle集群要更新各数据库的数据&#xff0c;折腾的启动不了了&#xff1a; --》数据量比较大&#xff0c;数据泵方式导出的dmp文件 准备导入集群 --》由于之前的生产数据库数据比较少&#xff0c;需要增大表空间。 --》于是在sqlplus命令窗口&#xff0c…

【JavaWeb】Day51.Mybatis动态SQL(一)

什么是动态SQL 在页面原型中&#xff0c;列表上方的条件是动态的&#xff0c;是可以不传递的&#xff0c;也可以只传递其中的1个或者2个或者全部。 而在我们刚才编写的SQL语句中&#xff0c;我们会看到&#xff0c;我们将三个条件直接写死了。 如果页面只传递了参数姓名name 字…

进程地址空间 【Linux】

文章目录 进程地址空间 进程地址空间 进程地址空间&#xff0c;本质是一个描述进程可视范围的大小&#xff0c; 地址空间内一定要存在各种区域划分&#xff0c;对线性地址进行start&#xff0c;和end即可 在每一个区的_start 到_end 范围内&#xff0c;这段连续的空间中&…

深入探索计算机视觉:高级主题与前沿应用的全面解析

引言 计算机视觉&#xff0c;作为人工智能领域的一个重要分支&#xff0c;旨在让计算机能够“看”懂世界&#xff0c;理解和解释视觉场景。随着深度学习技术的迅猛发展&#xff0c;计算机视觉已经在许多领域取得了显著的进展&#xff0c;如自动驾驶、安防监控、医疗诊断等。在…

JDBC查询大数据时怎么防止内存溢出-流式查询

文章目录 1.前言2.流式查询介绍3.使用流式查询3.1不开启流式查询的内存占用情况3.2开启流式查询的内存占用情况 4.开启流式查询的注意点 1.前言 在使用 JDBC 查询大数据时&#xff0c;由于 JDBC 默认将整个结果集加载到内存中&#xff0c;当查询结果集过大时&#xff0c;很容易…

刷机维修进阶教程----小米6 6x 5x机型修复基带 改写参数 改写串码实例步骤操作解析

在于众多工作室 业务接洽中有很多需要过新机的业务需求。那么大多都在机型参数和型号上面有关联。众所周知,改写机型参数为不允许的行为。操作只为解惑参数的一些常识,修复合规参数和修复手机系统为目的,请遵守国安家法律法规,今天将详细通过实例演示来解析小米6 6x 5x这些…

Fast-DetectGPT 无需训练的快速文本检测

本文提出了一种新的文本检测方法 ——Fast-DetectGPT&#xff0c;无需训练&#xff0c;直接使用开源小语言模型检测各种大语言模型&#xff0c;如GPT等生成的文本内容。 Fast-DetectGPT 将检测速度提高了 340 倍&#xff0c;将检测准确率相对提升了 75%&#xff0c;超过商用系…

【中级软件设计师】上午题12-软件工程(1):软件工程模型、敏捷方法、软件需求、系统设计

上午题12-软件工程&#xff08;1&#xff09; 1 软件过程1.1 CMM 能力成熟度模型1.1 CMMI (建议直接看思维导图&#xff09; 2 软件过程模型2.1 瀑布模型2.2 增量模型2.3 演化模型2.3.1 原型模型2.3.2 螺旋模型 2.5 喷泉模型 3 统一过程&#xff08;UP&#xff09;模型4 敏捷方…

【python】利用 GridSearchCV 和 SVM 进行学生成绩预测

在机器学习领域&#xff0c;寻找最优模型参数是一个重要的步骤&#xff0c;它直接影响模型的泛化能力和预测准确性。本文将通过一个具体案例介绍如何使用支持向量机&#xff08;SVM&#xff09;和网格搜索&#xff08;GridSearchCV&#xff09;来预测学生的成绩&#xff0c;并通…

可审批可审计追溯的单网络导出文件方案,了解一下

在物理隔离状态下&#xff0c;单网络导出文件是一个重要的安全需求&#xff0c;特别是在处理敏感数据时。在这种环境下&#xff0c;数据导出需要采取特殊的安全措施&#xff0c;以确保数据传输的安全性和合规性。需要考虑以下因素&#xff1a; 安全性&#xff1a;确保传输过程加…