forked from tmotagam/sqlite-electron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
135 lines (132 loc) · 4.02 KB
/
index.html
File metadata and controls
135 lines (132 loc) · 4.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Demo</title>
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
</head>
<body>
<h1>sqlite-electron Demo</h1>
<p>
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
<hr>
<br>
<label for="dbpath">Enter the path or name of the database</label>
<input id="dbpath" type="text">
<br>
<br>
<input type="checkbox" id="isuri" name="URI" value=true>
<label for="isuri"> Is path an SQLITE URI</label><br>
<br>
<button onclick="window.api.path()">Enter path of the database</button>
<br>
<p id="pout"></p>
<hr>
<br>
<label for="singlequery">Enter the query eg 'INSERT INTO sqlite_master (name, type, sql) VALUES (?, ?, ?)'</label>
<input id="singlequery" type="text">
<br>
<br>
<label for="value">Enter the value in array eg ["name", "query", "SQL"]</label>
<input id="value" type="text">
<br>
<br>
<button onclick="window.api.equery()">Execute a Single query</button>
<br>
<p id="pout1"></p>
<hr>
<br>
<label for="fetchallquery">Enter the query eg 'SELECT * FROM sqlite_master'</label>
<input id="fetchallquery" type="text">
<br>
<br>
<label for="fetchallvalue">Enter the value in array eg ["name", "query", "SQL"]</label>
<input id="fetchallvalue" type="text">
<br>
<br>
<button onclick="window.api.fetchall()">Fetch all the records from the database</button>
<br>
<p id="poutfa"></p>
<hr>
<br>
<label for="fetchonequery">Enter the query eg 'SELECT * FROM sqlite_master'</label>
<input id="fetchonequery" type="text">
<br>
<br>
<label for="fetchonevalue">Enter the value in array eg ["name", "query", "SQL"]</label>
<input id="fetchonevalue" type="text">
<br>
<br>
<button onclick="window.api.fetchone()">Fetch only one record from the database</button>
<br>
<p id="poutfo"></p>
<hr>
<br>
<label for="fetchmanyquery">Enter the query eg 'SELECT * FROM sqlite_master'</label>
<input id="fetchmanyquery" type="text">
<br>
<br>
<label for="fetchmanyvalue">Enter the value in array eg ["name", "query", "SQL"]</label>
<input id="fetchmanyvalue" type="text">
<br>
<br>
<label for="fetchmanysize">Enter the size eg 2</label>
<input id="fetchmanysize" type="int">
<br>
<br>
<button onclick="window.api.fetchmany()">Fetch multiple records from the database</button>
<br>
<p id="poutfm"></p>
<hr>
<br>
<label for="query">Enter the query</label>
<input id="query" type="text">
<br>
<br>
<label for="values">Enter the values in 2d array eg [["n", 2, 2.5], [1, 2, 3]]</label>
<input id="values" type="text">
<br>
<br>
<button onclick="window.api.mquery()">Execute Multiple query</button>
<br>
<p id="pout2"></p>
<hr>
<br>
<label for="scriptPath">Enter the sql script path</label>
<input id="scriptPath" type="text">
<button onclick="window.api.escript()">Execute SQL Script</button>
<br>
<p id="pout3"></p>
<hr>
<br>
<label for="extensionPath">Enter the extension path</label>
<input id="extensionPath" type="text">
<button onclick="window.api.load_extension()">Load Extension</button>
<br>
<p id="pout4"></p>
<hr>
<br>
<label for="backupPath">Enter the backup path</label>
<input id="backupPath" type="text">
<br>
<br>
<label for="pages">Enter the pages</label>
<input id="pages" value=-1 type="number">
<br>
<br>
<label for="name">Enter the name of the backup db</label>
<input id="name" value="main" type="text">
<br>
<br>
<label for="sleep">Enter the sleep time</label>
<input id="sleep" value=0.250 type="number">
<br>
<br>
<button onclick="window.api.backup()">Backup</button>
<br>
<p id="pout5"></p>
</body>
</html>