PluginProbe ʕ •ᴥ•ʔ
SiteOrigin CSS / 1.2.0
SiteOrigin CSS v1.2.0
1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.10 1.5.11 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0
so-css / lib / codemirror / addon / hint / sql-hint.min.js
so-css / lib / codemirror / addon / hint Last commit date
anyword-hint.js 10 years ago anyword-hint.min.js 8 years ago css-hint.js 11 years ago css-hint.min.js 9 years ago html-hint.js 11 years ago html-hint.min.js 8 years ago javascript-hint.js 9 years ago javascript-hint.min.js 8 years ago show-hint.css 9 years ago show-hint.js 9 years ago show-hint.min.js 8 years ago sql-hint.js 9 years ago sql-hint.min.js 8 years ago xml-hint.js 11 years ago xml-hint.min.js 10 years ago
sql-hint.min.js
1 lines
1 !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";function e(t){return"[object Array]"==Object.prototype.toString.call(t)}function r(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).keywords}function n(e){var r=e.doc.modeOption;return"sql"===r&&(r="text/x-sql"),t.resolveMode(r).identifierQuote||"`"}function o(t){return"string"==typeof t?t:t.text}function i(t,r){return e(r)&&(r={columns:r}),r.text||(r.text=t),r}function s(t){var r={};if(e(t))for(var n=t.length-1;n>=0;n--){var s=t[n];r[o(s).toUpperCase()]=i(o(s),s)}else if(t)for(var a in t)r[a.toUpperCase()]=i(a,t[a]);return r}function a(t){return h[t.toUpperCase()]}function u(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function l(t,e){var r=t.length,n=o(e).substr(0,r);return t.toUpperCase()===n.toUpperCase()}function f(t,r,n,o){if(e(n))for(var i=0;i<n.length;i++)l(r,n[i])&&t.push(o(n[i]));else for(var s in n)if(n.hasOwnProperty(s)){var a=n[s];a=a&&!0!==a?a.displayText?{text:a.text,displayText:a.displayText}:a.text:s,l(r,a)&&t.push(o(a))}}function c(t){"."==t.charAt(0)&&(t=t.substr(1));for(var e=t.split(y+y),r=0;r<e.length;r++)e[r]=e[r].replace(new RegExp(y,"g"),"");return e.join(y)}function p(t){for(var e=o(t).split("."),r=0;r<e.length;r++)e[r]=y+e[r].replace(new RegExp(y,"g"),y+y)+y;var n=e.join(".");return"string"==typeof t?n:(t=u(t),t.text=n,t)}function g(t,e,r,n){for(var o=!1,i=[],s=e.start,l=!0;l;)l="."==e.string.charAt(0),o=o||e.string.charAt(0)==y,s=e.start,i.unshift(c(e.string)),e=n.getTokenAt(b(t.line,e.start)),"."==e.string&&(l=!0,e=n.getTokenAt(b(t.line,e.start)));var g=i.join(".");f(r,g,h,function(t){return o?p(t):t}),f(r,g,x,function(t){return o?p(t):t}),g=i.pop();var d=i.join("."),m=!1,A=d;if(!a(d)){var q=d;d=v(d,n),d!==q&&(m=!0)}var C=a(d);return C&&C.columns&&(C=C.columns),C&&f(r,g,C,function(t){var e=d;return 1==m&&(e=A),"string"==typeof t?t=e+"."+t:(t=u(t),t.text=e+"."+t.text),o?p(t):t}),s}function d(t,e){if(t)for(var r=/[,;]/g,n=t.split(" "),o=0;o<n.length;o++)e(n[o]?n[o].replace(r,""):"")}function v(t,e){for(var r=e.doc,n=r.getValue(),o=t.toUpperCase(),i="",s="",u=[],l={start:b(0,0),end:b(e.lastLine(),e.getLineHandle(e.lastLine()).length)},f=n.indexOf(A.QUERY_DIV);-1!=f;)u.push(r.posFromIndex(f)),f=n.indexOf(A.QUERY_DIV,f+1);u.unshift(b(0,0)),u.push(b(e.lastLine(),e.getLineHandle(e.lastLine()).text.length));for(var c=null,p=e.getCursor(),g=0;g<u.length;g++){if((null==c||q(p,c)>0)&&q(p,u[g])<=0){l={start:c,end:u[g]};break}c=u[g]}for(var v=r.getRange(l.start,l.end,!1),g=0;g<v.length;g++){if(d(v[g],function(t){var e=t.toUpperCase();e===o&&a(i)&&(s=i),e!==A.ALIAS_KEYWORD&&(i=t)}),s)break}return s}var h,x,m,y,A={QUERY_DIV:";",ALIAS_KEYWORD:"AS"},b=t.Pos,q=t.cmpPos;t.registerHelper("hint","sql",function(t,e){h=s(e&&e.tables);var o=e&&e.defaultTable,i=e&&e.disableKeywords;x=o&&a(o),m=r(t),y=n(t),o&&!x&&(x=v(o,t)),x=x||[],x.columns&&(x=x.columns);var u,l,c,p=t.getCursor(),d=[],A=t.getTokenAt(p);return A.end>p.ch&&(A.end=p.ch,A.string=A.string.slice(0,p.ch-A.start)),A.string.match(/^[.`"\w@]\w*$/)?(c=A.string,u=A.start,l=A.end):(u=l=p.ch,c=""),"."==c.charAt(0)||c.charAt(0)==y?u=g(p,A,d,t):(f(d,c,h,function(t){return t}),f(d,c,x,function(t){return t}),i||f(d,c,m,function(t){return t.toUpperCase()})),{list:d,from:b(p.line,u),to:b(p.line,l)}})});