Skip to content

Commit

Permalink
Add sql support
Browse files Browse the repository at this point in the history
  • Loading branch information
nsa-a1 committed Dec 8, 2021
1 parent fdfc569 commit 8aa968e
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.sinnlabs</groupId>
<artifactId>zk-codemirror</artifactId>
<version>0.5</version>
<version>0.6-SNAPSHOT</version>
<packaging>jar</packaging>

<name>ZK Codemirror</name>
Expand Down
2 changes: 1 addition & 1 deletion src/metainfo/zk/lang-addon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
then zk-version, the addon will be ignored -->
<version>
<version-class>org.sinnlabs.zk.codemirror.Version</version-class>
<version-uid>0.5</version-uid>
<version-uid>0.6-SNAPSHOT</version-uid>
<zk-version>7.0.0</zk-version><!-- or later -->
</version>

Expand Down
2 changes: 1 addition & 1 deletion src/org/sinnlabs/zk/codemirror/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
*
*/
public class Version {
public static final String UID = "0.5";
public static final String UID = "0.6-SNAPSHOT";
}
23 changes: 23 additions & 0 deletions src/org/sinnlabs/zk/ui/CodeMirror.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,29 @@ public class CodeMirror extends Textbox {
public static final String TIKI_WIKI = "text/tiki";

public static final String ASCIIDOC = "text/asciidoc";

public static final String SQL = "text/x-sql";

public static final String MYSQL = "text/x-mysql";

public static final String MARIADB = "text/x-mariadb";

public static final String CASANDRA = "text/x-cassandra";

public static final String PLSQL = "text/x-plsql";

public static final String MSSQL = "text/x-mssql";

public static final String HIVE = "text/x-hive";

public static final String PGSL = "text/x-pgsql";

public static final String GQL = "text/x-gql";

public static final String GQSQL = "text/x-gpsql";

public static final String ESPER = "text/x-esper";


/**
* Based on codemirror\mode\meta.js
Expand Down
503 changes: 503 additions & 0 deletions src/web/js/org/sinnlabs/zk/ui/mode/sql.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/web/js/org/sinnlabs/zk/ui/zk.wpd
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
<script src="mode/tiddlywiki.js" />
<script src="mode/tiki.js" />
<script src="mode/asciidoc.js" />
<script src="mode/sql.js" />
<widget name="CodeMirrorWidget"/>
</package>

0 comments on commit 8aa968e

Please sign in to comment.