-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
74 lines (60 loc) · 3.17 KB
/
index.html
File metadata and controls
74 lines (60 loc) · 3.17 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- https://bootswatch.com/slate/ -->
<link href="./css/bootstrap.min.css" rel="stylesheet" >
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SQL Queries Generator</title>
</head>
<body>
<h2>SQL Queries Generator</h2>
<button type="button" class="btn btn-outline-warning btn-lg" onclick="generateSQL()">Generate SQL Queries</button>
<button type="button" class="btn btn-outline-success btn-lg" onclick="copyToCplipboard('textToCopy')">Copy SQL</button>
<button type="button" class="btn btn-outline-danger btn-lg" onclick="clearForm('myForm')">Clear data</button>
<button type="button" class="btn btn-outline-info btn-lg" onclick="fillFormWithSampleDataSingleRow()">Sample data - SINGLE ROW</button>
<button type="button" class="btn btn-outline-info btn-lg" onclick="fillFormWithSampleDataMultiRows()">Sample data - MULTI ROWS</button>
<div id="textToCopy">
<h4>
<pre id="result"></pre>
</h4>
</div>
<form id="myForm">
<div class="row">
<div class="col">
<label for="queryType" class="form-label mt-4">Choose query type</label>
<select class="form-select" id="queryType">
<option value="insert">Insert</option>
<option value="update">Update</option>
<option value="delete">Delete</option>
</select>
</div>
<div class="col">
<label class="form-label mt-4" for="tableName">Table Name</label>
<input type="text" class="form-control" placeholder="TableNameExample" id="tableName">
</div>
<div class="col">
<label class="form-label mt-4" for="primaryKey">Primary Key (for Update / Delete only)</label>
<input type="text" class="form-control" placeholder="exampleId" id="primaryKey">
</div>
</div>
<div class="form-group">
<label class="col-form-label mt-4" for="columnName">Column Name(s) (separated with - ' , ')</label>
<input type="text" class="form-control" placeholder="ColumnName1, ColumnName2, ColumnName3" id="columnName">
</div>
<div class="form-group">
<label for="dataValue" class="form-label mt-4">Data Value(s) (columns separated with - ' , ' rows separated with - ' ; ')</label>
<textarea class="form-control" id="dataValue" placeholder="Value1, Value2, Value3, Value4" rows="5"></textarea>
</div>
<div class="form-group">
<label for="primaryKeyValue" class="form-label mt-4">Primary Key Value (for Update / Delete only)</label>
<textarea class="form-control" id="primaryKeyValue" placeholder="1" rows="5"></textarea>
<br>
</div>
</form>
<script src="./js/sql-generate.js"></script>
<script src="./js/copy-text.js"></script>
<script src="./js/clear-form.js"></script>
<script src="./js/sample-data-filling.js"></script>
</body>
</html>