New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.6 to 0.1.7

4

CHANGELOG.md
#0.1.6
* Fixed bug with count method. Added return type to get and getAll method
#0.1.6
* Added count method

@@ -4,0 +8,0 @@

6

dist/on.d.ts

@@ -22,3 +22,3 @@ import 'reflect-metadata';

*/
get(wheres: any, options?: string[]): Promise<any>;
get(wheres: any, options?: string[]): Promise<T>;
/**

@@ -29,3 +29,3 @@ * Get all data matched the given where clause object

*/
getAll(wheres?: any, options?: QueryOption): Promise<any>;
getAll(wheres?: any, options?: QueryOption): Promise<T[]>;
/**

@@ -53,3 +53,3 @@ * Save an object to the db if not exists, else update it

*/
count(wheres: any): Promise<any>;
count(wheres: any): Promise<number>;
}

@@ -124,3 +124,3 @@ "use strict";

const data = yield this.db.query(statement);
return data.count;
return data[0].count;
});

@@ -127,0 +127,0 @@ }

{
"name": "classql",
"version": "0.1.6",
"version": "0.1.7",
"main": "dist/index.js",

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

@@ -34,3 +34,3 @@ const mysql = require('promise-mysql');

*/
public async get(wheres: any, options?: string[]): Promise<any> {
public async get(wheres: any, options?: string[]): Promise<T> {
if (!wheres) throw new Error(errors.where);

@@ -52,3 +52,3 @@

*/
public async getAll(wheres?: any, options?: QueryOption): Promise<any> {
public async getAll(wheres?: any, options?: QueryOption): Promise<T[]> {
let statement = 'SELECT * FROM ' + this.table;

@@ -123,3 +123,3 @@

*/
public async count(wheres: any): Promise<any> {
public async count(wheres: any): Promise<number> {
if (!wheres) throw new Error(errors.where);

@@ -130,4 +130,4 @@

const data = await this.db.query(statement);
return data.count;
return data[0].count;
}
}

Sorry, the diff of this file is not supported yet

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