-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSQLStr.js
More file actions
17 lines (16 loc) · 1.24 KB
/
SQLStr.js
File metadata and controls
17 lines (16 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//SQL used in UserDAO
exports.COUNTTOTALUSERS = "select count(*) as total from user";
exports.FINDALLUSERS = "select * from user";
exports.FINDUSERBYUSERNAME = "select * from user where userName = ?";
exports.CREATEUSER = "insert into user (userName,password,createTime,lastModifyTime) values (?,?,?,?)";
exports.FINDUSERBYUSERNAMEPWD="select * from user where userName = ? and password=?";
exports.DELETEUSER="delete user where userName=?";
//exports.CREATECATEGORY = "insert into category (id,filename,postfix,size,path,location,createTime,lastModifyTime,others) values (null,?,?,?,?,?,?,?,?)";
//SQL used in UserPubKeyDAO
exports.COUNTTOTALUSERPUBKEYS = "select count(*) as total from userPubKey";
exports.COUNTUSERPUBKEYSBYUSERNAME = "select count(*) as total from userPubKey where userName=?";
exports.FINDPUBKEYBYND = "select * from userPubKey where userName = ? and UUID=?";
exports.FINDPUBKEYSBYNAME = "select * from userPubKey where userName = ?";
exports.CREATEUSERPUBKEY = "insert into userPubKey (userName,UUID,pubKey,createTime,lastModifyTime) values (?,?,?,?,?)";
exports.DELETEPUBKEY = "delete from userPubKey where userName = ? and UUID=?";
exports.UPDATEPUBKEY = "update userPubKey set pubKey = ? , lastModifyTime=? where userName = ? and UUID=?";