Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CodeMirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Moritz Aurel Pascal Schubotz
CodeMirror
Commits
eafb2cad
Commit
eafb2cad
authored
11 years ago
by
santec
Committed by
Marijn Haverbeke
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[sql mode] Minor fixes
* index.html included codemirror.js twice * optimize .tableName syntax check
parent
9fcee65e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mode/sql/index.html
+1
-2
1 addition, 2 deletions
mode/sql/index.html
mode/sql/sql.js
+1
-1
1 addition, 1 deletion
mode/sql/sql.js
with
2 additions
and
3 deletions
mode/sql/index.html
+
1
−
2
View file @
eafb2cad
...
...
@@ -5,7 +5,6 @@
<title>
SQL Mode for CodeMirror
</title>
<link
rel=
"stylesheet"
href=
"../../lib/codemirror.css"
/>
<script
src=
"../../lib/codemirror.js"
></script>
<script
src=
"../../lib/codemirror.js"
></script>
<script
src=
"sql.js"
></script>
<style>
.CodeMirror
{
...
...
@@ -39,7 +38,7 @@ var init = function() {
<form>
<textarea
id=
"code"
name=
"code"
>
-- SQL Mode for CodeMirror
SELECT SQL_NO_CACHE DISTINCT
@var1 AS `val1`, @
'
val2
'
, @global.'sql_mode',
@var1 AS `val1`, @
`
val2
`
, @global.'sql_mode',
1.1 AS `float_val`, .14 AS `another_float`, 0.09e3 AS `int_with_esp`,
0xFA5 AS `hex`, x'fa5' AS `hex2`, 0b101 AS `bin`, b'101' AS `bin2`,
DATE '1994-01-01' AS `sql_date`, { T "1994-01-01" } AS `odbc_date`,
...
...
This diff is collapsed.
Click to expand it.
mode/sql/sql.js
+
1
−
1
View file @
eafb2cad
...
...
@@ -55,7 +55,7 @@ CodeMirror.defineMode("sql", function(config, parserConfig) {
return
"
number
"
;
}
// .table_name (ODBC)
if
(
s
tream
.
match
(
/^
[
a-zA-Z_
]
+/
)
&&
support
.
ODBCdotTable
==
true
)
{
if
(
s
upport
.
ODBCdotTable
==
true
&&
stream
.
match
(
/^
[
a-zA-Z_
]
+/
)
)
{
return
"
variable-2
"
;
}
}
else
if
(
operatorChars
.
test
(
ch
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment