Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
sqlite-sync
Advanced tools
Changelog
0.3.9 (2019-08-12)
Readme
Node module to sqlite sync and async
node.js package for database connection with SQLite , and execute SQL commands synchronously or asynchronously.
npm install sqlite-sync
var sqlite = require('sqlite-sync'); //requiring
//Connecting - if the file does not exist it will be created
sqlite.connect('test/test.db');
//Creating table - you can run any command
sqlite.run("CREATE TABLE COMPANYS(ID INTEGER PRIMARY KEY AUTOINCREMENT, NAME TEXT NOT NULL);",function(res){
if(res.error)
throw res.error;
console.log(res);
});
//Inserting - this function can be sync to, look the wiki
sqlite.insert("COMPANYS",{NAME:"My COMPANY"}, function(res){
if(res.error)
throw res.error;
console.log(res);
});
//Updating - returns the number of rows modified - can be async too
var rows_modified = sqlite.update("COMPANYS",{NAME:"TESTING UPDATE"},{ID:1});
//Create your function
function test(a,b){
return a+b;
}
//Add your function to connection
sqlite.create_function(test);
// Use your function in the SQL
console.log(sqlite.run("SELECT ID, test(NAME, ' Inc') as NAME FROM COMPANYS"));
// Closing connection
sqlite.close();
FAQs
Node module to sqlite sync and async
The npm package sqlite-sync receives a total of 299 weekly downloads. As such, sqlite-sync popularity was classified as not popular.
We found that sqlite-sync demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.