File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change 11< html >
22 < head >
33 < title > sqldef</ title >
4+ < style >
5+ body {
6+ font-family : sans-serif;
7+ }
8+ .demo {
9+ display : flex;
10+ gap : 10px ;
11+ }
12+ textarea {
13+ height : 50vh ;
14+ flex : 1 ;
15+ }
16+ </ style >
417 </ head >
518 < body >
619 < p > This is meant to be a very simple demo. Please see < a href ="https://sqldef.github.io "> our site</ a > for docs & more complete demo.</ p >
20+
21+ < div class ="demo ">
22+ < textarea readonly >
23+ CREATE TABLE user (
24+ id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
25+ name VARCHAR(128) DEFAULT 'konsumer'
26+ ) Engine=InnoDB DEFAULT CHARSET=utf8mb4;
27+ </ textarea >
28+ < textarea readonly >
29+ CREATE TABLE user (
30+ id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
31+ name VARCHAR(128) DEFAULT 'konsumer',
32+ created_at DATETIME NOT NULL
33+ ) Engine=InnoDB DEFAULT CHARSET=utf8mb4;
34+ </ textarea >
35+ < textarea readonly > </ textarea >
36+ </ div >
37+
738 < script type ="module ">
839 import sqldef from '/sqldef/index.js'
9- // put demo code here
40+ const [ tin , tchange , tout ] = document . querySelectorAll ( 'textarea' )
41+ tout . value = await sqldef ( 'mysql' , tin . value , tchange . value )
1042 </ script >
1143 </ body >
1244</ html >
You can’t perform that action at this time.
0 commit comments