sqlite3-dal
v1.0.2
Published
sqlite3-orm sqlite3 dal
Downloads
2
Maintainers
Readme
sqlite3-dal
About
a sqlite3-orm mini package
How use
let SqlDal=require('sqlite3-dal');
let sqlDal=new SqlDal('./test.db3','tb_user');
sqlDal.findAll().then(console.log,console.log);
API
query(sqlStr, params):Promise<Array>
insert(entity):Promise<Array>
truncate():Promise<Array>
remove(whereStr):Promise<Array>
removeById(id):Promise<Array>
update(entity, whereStr):Promise<Array>
updateByParams(entity, where):Promise<Array>
updateById(entity, id):Promise<Array>
findAll(columns,orderStr):Promise<Array>
findById(id):Promise<Array>
findOne(query):Promise<Array>
findWithQuery(query):Promise<Array>
findTop(columns, count, whereStr):Promise<Array>
findCount(fromStr, whereStr):Promise<Array>
find(columns, whereStr, sortStr, count):Promise<Array>
findByPage(fieldStr, fromStr, whereStr, sortStr, pageIndex, pageSize):Promise<Array>
getTableNames(tableName):Promise<Array>
findColumnName(tableName):Promise<Array>
findMaxId(tableName):Promise<Array>