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

think-model-postgresql

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-model-postgresql - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

33

index.js

@@ -6,31 +6,6 @@ const Abstract = require('think-model-abstract');

const QUERY = Symbol('think-model-query');
const SCHEMA = Symbol('think-model-schema');
const PARSER = Symbol('think-model-parser');
module.exports = class PostgreSQLAdapter extends Abstract {};
module.exports = class PostgreSQLAdapter extends Abstract {
/**
* get parser instance
*/
get parser() {
if (this[PARSER]) return this[PARSER];
this[PARSER] = new Parser(this.model.config);
return this[PARSER];
}
/**
* get query instance
*/
get query() {
if (this[QUERY]) return this[QUERY];
this[QUERY] = new Query(this.model.config);
return this[QUERY];
}
/**
* get schema instance
*/
get schema() {
if (this[SCHEMA]) return this[SCHEMA];
this[SCHEMA] = new Schema(this.model.config, this.model.schema, this.model.tableName);
return this[SCHEMA];
}
};
module.exports.Query = Query;
module.exports.Parser = Parser;
module.exports.Schema = Schema;
const {Query} = require('think-model-abstract');
const Parser = require('./parser.js');
const PostgreSQLSocket = require('./socket.js');
const PARSER = Symbol('think-model-sqlite-parser');
/**

@@ -12,10 +9,2 @@ * mysql query

/**
* get parser instance
*/
get parser() {
if (this[PARSER]) return this[PARSER];
this[PARSER] = new Parser(this.config);
return this[PARSER];
}
/**
* get socket

@@ -22,0 +11,0 @@ * @param {String|Object} sql

const helper = require('think-helper');
const {Schema} = require('think-model-abstract');
const Debounce = require('think-debounce');
const Query = require('./query.js');
const Parser = require('./parser.js');
const QUERY = Symbol('think-model-sqlite-query');
const PARSER = Symbol('think-model-sqlite-parser');
const debounce = new Debounce();

@@ -16,18 +12,2 @@ const SCHEMAS = {};

module.exports = class MysqlSchema extends Schema {
/**
* get query instance
*/
get query() {
if (this[QUERY]) return this[QUERY];
this[QUERY] = new Query(this.config);
return this[QUERY];
}
/**
* get parset instance
*/
get parser() {
if (this[PARSER]) return this[PARSER];
this[PARSER] = new Parser(this.config);
return this[PARSER];
}
_getItemSchemaValidate(fieldData) {

@@ -34,0 +14,0 @@ const validate = {};

2

package.json
{
"name": "think-model-postgresql",
"version": "1.0.3",
"version": "1.0.4",
"description": "PostgreSQL adapter for ThinkJS 3.x",

@@ -5,0 +5,0 @@ "scripts": {

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