Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

classql

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classql - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

4

CHANGELOG.md

@@ -0,3 +1,7 @@

#0.1.2
* Updated README.md. Add saveAll use case.
#0.1.1
* Updated README.md

2

package.json
{
"name": "classql",
"version": "0.1.1",
"version": "0.1.2",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "bugs": "https://github.com/sorakthunly/classql/issues",

@@ -60,3 +60,3 @@ # classql

// Returns a list of objects or an empty list:
await db.on(UserAccount)>getAll();
await db.on(UserAccount).getAll();
await db.on(UserAccount).getAll({ firstName: 'John' });

@@ -83,3 +83,2 @@

});
let result = await db.on(UserAccount).save(account);

@@ -89,2 +88,11 @@ let id = result.insertId;

/** CREATE ALL OR UPDATE ALL */
// If no id field exists on every object in a list, this method runs INSERT query.
// Otherwise, it will run INSERT and ON DUPLICATE UPDATE.
let items = [
new UserAccount({ ... }), new UserAccount({ ... }), new UserAccount({ ... })
];
await db.on(UserAccount).saveAll(items);
// Alternatively, to enter prepared sql statement just do:

@@ -91,0 +99,0 @@ db.query('SELECT * FROM USER_ACCOUNTS WHERE id > 5').then(doSth).catch(doSthElse);

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