芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/chikindzonotyucatan.gob.mx/media/vendor/codemirror/addon/hint/sql-hint.min.js
!function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../../mode/sql/sql")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../../mode/sql/sql"],t):t(CodeMirror)}((function(t){"use strict";var e,r,n,o,i=";",s="AS",a=t.Pos,u=t.cmpPos;function l(t){return"[object Array]"==Object.prototype.toString.call(t)}function f(t){return"string"==typeof t?t:t.text}function c(t,e){return l(e)&&(e={columns:e}),e.text||(e.text=t),e}function p(t){return e[t.toUpperCase()]}function d(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function g(t,e){var r=t.length,n=f(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function h(t,e,r,n){if(l(r))for(var o=0;o
0)&&u(v,c[x])<=0){d={start:h,end:c[x]};break}h=c[x]}if(d.start){var b=r.getRange(d.start,d.end,!1);for(x=0;x
=0;r--){var n=t[r];e[f(n).toUpperCase()]=c(f(n),n)}else if(t)for(var o in t)e[o.toUpperCase()]=c(o,t[o]);return e}(s&&s.tables);var u=s&&s.defaultTable,g=s&&s.disableKeywords;r=u&&p(u),n=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}(i),o=function(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}(i),u&&!r&&(r=b(u,i)),(r=r||[]).columns&&(r=r.columns);var m,y,C,q=i.getCursor(),A=[],j=i.getTokenAt(q);if(j.end>q.ch&&(j.end=q.ch,j.string=j.string.slice(0,q.ch-j.start)),j.string.match(/^[.`"'\w@][\w$#]*$/g)?(C=j.string,m=j.start,y=j.end):(m=y=q.ch,C=""),"."==C.charAt(0)||C.charAt(0)==o)m=function(t,n,i,s){for(var u=!1,l=[],f=n.start,c=!0;c;)c="."==n.string.charAt(0),u=u||n.string.charAt(0)==o,f=n.start,l.unshift(v(n.string)),"."==(n=s.getTokenAt(a(t.line,n.start))).string&&(c=!0,n=s.getTokenAt(a(t.line,n.start)));var g=l.join(".");h(i,g,e,(function(t){return u?x(t):t})),h(i,g,r,(function(t){return u?x(t):t})),g=l.pop();var m=l.join("."),y=!1,C=m;if(!p(m)){var q=m;(m=b(m,s))!==q&&(y=!0)}var A=p(m);return A&&A.columns&&(A=A.columns),A&&h(i,g,A,(function(t){var e=m;return 1==y&&(e=C),"string"==typeof t?t=e+"."+t:(t=d(t)).text=e+"."+t.text,u?x(t):t})),f}(q,j,A,i);else{var w=function(t,e){return"object"==typeof t?t.className=e:t={text:t,className:e},t};h(A,C,r,(function(t){return w(t,"CodeMirror-hint-table CodeMirror-hint-default-table")})),h(A,C,e,(function(t){return w(t,"CodeMirror-hint-table")})),g||h(A,C,n,(function(t){return w(t.toUpperCase(),"CodeMirror-hint-keyword")}))}return{list:A,from:a(q.line,m),to:a(q.line,y)}}))}));