Socket
Socket
Sign inDemoInstall

sql

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql

sql builder


Version published
Weekly downloads
8K
increased by8.8%
Maintainers
1
Weekly downloads
 
Created
Source

node-sql

sql string builder for node

examples

//require the module
var sql = require('sql');

//first we define our table
var user = sql.define({
  name: 'user',
  columns: ['id', 'email', 'lastLogin']
});

//now we make a query
var usersWhoLoggedInBeforeToday = user.select(user.id, user.email).from(user).where(user.lastLogin.lt(new Date()));
console.log(usersWhoLoggedInBeforeToday); 
// { text: 'SELECT user.'id', user.'email' FROM user WHERE user.'lastLogin' > $1', values: ['2011-01-1'] }

I know this is a cop-out for now, but for more in-depth examples view test/dialect-tests.js

help!

I need help with a mysql and sqlite syntax. Even if you don't want to contribute code, I could still use some failing tests I can work towards. You see, I don't really know mysql or sqlite syntax very well and don't use either database much. If you'd like to contribute, please message me on github. I'll give you commit access, and we'll be off to the races.

FAQs

Package last updated on 10 Apr 2012

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc