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

@spinajs/orm-sqlite

Package Overview
Dependencies
Maintainers
1
Versions
333
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spinajs/orm-sqlite - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

7

lib/compilers.d.ts
import { SqlColumnQueryCompiler, SqlTableQueryCompiler } from "@spinajs/orm-sql";
import { ICompilerOutput } from "@spinajs/orm";
import { ICompilerOutput, OrderByBuilder, OrderByQueryCompiler } from "@spinajs/orm";
export declare class SqliteOrderByCompiler extends OrderByQueryCompiler {
protected _builder: OrderByBuilder;
constructor(builder: OrderByBuilder);
compile(): ICompilerOutput;
}
export declare class SqliteTableQueryCompiler extends SqlTableQueryCompiler {

@@ -4,0 +9,0 @@ compile(): ICompilerOutput;

@@ -8,6 +8,37 @@ "use strict";

};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const orm_sql_1 = require("@spinajs/orm-sql");
const orm_1 = require("@spinajs/orm");
const di_1 = require("@spinajs/di");
const _ = require("lodash");
let SqliteOrderByCompiler = class SqliteOrderByCompiler extends orm_1.OrderByQueryCompiler {
constructor(builder) {
super();
if (!builder) {
throw new Error('builder cannot be null or undefined');
}
this._builder = builder;
}
compile() {
const sort = this._builder.getSort();
let stmt = '';
const bindings = [];
if (sort) {
stmt = ` ORDER BY ? ${sort.order.toLowerCase() === "asc" ? "ASC" : "DESC"}`;
bindings.push(sort.column);
}
return {
bindings,
expression: stmt,
};
}
};
SqliteOrderByCompiler = __decorate([
di_1.NewInstance(),
__metadata("design:paramtypes", [orm_1.OrderByBuilder])
], SqliteOrderByCompiler);
exports.SqliteOrderByCompiler = SqliteOrderByCompiler;
let SqliteTableQueryCompiler = class SqliteTableQueryCompiler extends orm_sql_1.SqlTableQueryCompiler {

@@ -14,0 +45,0 @@ compile() {

@@ -93,2 +93,3 @@ "use strict";

this.Container.register(compilers_1.SqliteTableQueryCompiler).as(orm_1.TableQueryCompiler);
this.Container.register(compilers_1.SqliteOrderByCompiler).as(orm_1.OrderByQueryCompiler);
}

@@ -95,0 +96,0 @@ async transaction(qrOrCallback) {

2

package.json
{
"name": "@spinajs/orm-sqlite",
"version": "1.0.8",
"version": "1.0.9",
"description": "SpinaJS orm sqlite support. Contains sqlite driver.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

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