-
Notifications
You must be signed in to change notification settings - Fork 7
Examples
Pamblam edited this page Dec 11, 2016
·
2 revisions
Each of the following queries are identical
jSQL.query("Create table if not exists oTable "+
"(name varchar(50,5), age int, created date, greet function, favorite_hat hat)").execute();
jSQL.createTable({oTable: {
name: {type:"VARCHAR": args:[50,5]},
age: {type:"INT"},
created: {type:"DATE"},
greet: {type:"FUNCTION"},
favorite_hat: {type:"HAT"}
}}).ifNotExists().execute();
Each of the following queries are identical
jSQL.query('SELECT * FROM table WHERE column1 = "value"').execute();
jSQL.query('SELECT * FROM table WHERE column1 = ?').execute(['value']);
jSQL.select('*').from('table').where('column1').equals("value").execute();
Each of the following queries are identical
jSQL.query('UPDATE table SET column = value').execute();
jSQL.query('UPDATE table SET column = ?').execute(['value']);
jSQL.update('table').set({column: 'value'}).execute();
jSQL.update('table').set({column: '?'}).execute(['value']);
Each of the following queries are identical
jSQL.query('DELETE FROM table WHERE column = value').execute();
jSQL.query('DELETE FROM table WHERE column = ?').execute(['value']);
jSQL.deleteFrom('table').where('column').equals('value').execute();
jSQL.deleteFrom('table').where('column').equals('?').execute(['value']);
Each of the following queries are identical
jSQL.query('DROP TABLE `Users`').execute();
jSQL.dropTable('Users').execute();
jSQLTable.name
jSQLTable.columns
jSQLTable.data
jSQLTable.colmap
jSQLTable.renameColumn
jSQLTable.addColumn
jSQLTable.loadData
jSQLTable.insertRow
jSQLQuery.ifNotExists
jSQLQuery.ignore
jSQLQuery.execute
jSQLQuery.fetch
jSQLQuery.fetchAll
jSQLQuery.values
jSQLQuery.set
jSQLQuery.where
jSQLQuery.from
jSQLQuery.limit
jSQLQuery.orderBy
jSQLQuery.asc
jSQLQuery.desc
jSQLQuery.distinct
jSQLWhereClause.where
jSQLWhereClause.equals
jSQLWhereClause.preparedLike
jSQLWhereClause.doesNotEqual
jSQLWhereClause.lessThan
jSQLWhereClause.contains
jSQLWhereClause.endsWith
jSQLWhereClause.beginsWith
jSQLWhereClause.and
jSQLWhereClause.or
jSQLWhereClause.limit
jSQLWhereClause.orderBy
jSQLWhereClause.asc
jSQLWhereClause.desc
jSQLWhereClause.execute