Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 07e899d

Browse files
committed
add SQL example
1 parent aebbfde commit 07e899d

File tree

1 file changed

+40
-25
lines changed

1 file changed

+40
-25
lines changed

src/app/code-editor-demo/file-database.ts

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,46 @@ const FILES_DATA: FileNode[] = [
77
name: 'Files',
88
type: FileNodeType.folder,
99
children: [
10+
{
11+
name: 'schema.sql',
12+
type: FileNodeType.file,
13+
code: {
14+
language: 'sql',
15+
uri: 'schema.sql',
16+
value: [
17+
'CREATE TABLE dbo.EmployeePhoto (',
18+
' EmployeeId INT NOT NULL PRIMARY KEY,',
19+
' Photo VARBINARY(MAX) FILESTREAM NULL,',
20+
' MyRowGuidColumn UNIQUEIDENTIFIER NOT NULL ROWGUIDCOL UNIQUE DEFAULT NEWID()',
21+
');'
22+
].join('\n')
23+
}
24+
},
25+
{
26+
name: 'component.style.css',
27+
type: FileNodeType.file,
28+
code: {
29+
language: 'css',
30+
uri: 'component.style.css',
31+
value: [
32+
'html {',
33+
' background-color: #e2e2e2;',
34+
' margin: 0;',
35+
' padding: 0;',
36+
'}',
37+
'',
38+
'body {',
39+
' background-color: #fff;',
40+
' border-top: solid 10px #000;',
41+
' color: #333;',
42+
' font-size: .85em;',
43+
' font-family: "Segoe UI","HelveticaNeue-Light", sans-serif;',
44+
' margin: 0;',
45+
' padding: 0;',
46+
'}'
47+
].join('\n')
48+
}
49+
},
1050
{
1151
name: 'json.json',
1252
type: FileNodeType.file,
@@ -79,31 +119,6 @@ const FILES_DATA: FileNode[] = [
79119
'}'
80120
].join('\n')
81121
}
82-
},
83-
{
84-
name: 'component.style.css',
85-
type: FileNodeType.file,
86-
code: {
87-
language: 'css',
88-
uri: 'component.style.css',
89-
value: [
90-
'html {',
91-
' background-color: #e2e2e2;',
92-
' margin: 0;',
93-
' padding: 0;',
94-
'}',
95-
'',
96-
'body {',
97-
' background-color: #fff;',
98-
' border-top: solid 10px #000;',
99-
' color: #333;',
100-
' font-size: .85em;',
101-
' font-family: "Segoe UI","HelveticaNeue-Light", sans-serif;',
102-
' margin: 0;',
103-
' padding: 0;',
104-
'}'
105-
].join('\n')
106-
}
107122
}
108123
]
109124
},

0 commit comments

Comments
 (0)