Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Createdb
- db.transaction(function(tx) {
- tx.executeSql( 'CREATE TABLE IF NOT EXISTS Connections ( \
- id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, \
- connection_name TEXT NOT NULL, \
- username TEXT NOT NULL, \
- address VARCHAR(255) NOT NULL, \
- type TEXT NOT NULL, \
- category TEXT NOT NULL, \
- act_on_start BOOL NOT NULL, \
- connection_commands VARCHAR(255) \
- );' );
- })
- }
- Add con
- function createConnection(name,username,address,type,category,aos,commands){
- var db = getDBase();
- db.transaction(function(tx){
- tx.executeSql('INSERT INTO Connections (connection_name, username,address, type, \
- category,act_on_start, connection_commands) VALUES (?,?,?,?,?,?,?);', [name,username,address,type,category,aos,commands]);
- })
- }
- Remove con
- function removeConnection(id,name,username,address,type,category,aos,commands){
- var db = getDBase();
- db.transaction(function(tx) {
- tx.executeSql('DELETE FROM Connections WHERE id=? AND connection_name=? AND username=? AND address=? \
- AND type=? AND category=? AND act_on_start=? AND connection_commands=?', [id,name,username,address,type,category,aos,commands]);
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement