New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

db2graphql

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

db2graphql - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

0

demo_mssql/connection.example.json

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ const knex = require('knex');

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ # Create user

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ const knex = require('knex');

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ # Create user

@@ -0,0 +0,0 @@ const knex = require('knex');

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ # Create user

@@ -0,0 +0,0 @@ const doop = require('jsdoc/util/doop');

@@ -0,0 +0,0 @@ The default template for JSDoc 3 uses: [the Taffy Database library](http://taffydb.com/) and the [Underscore Template library](http://underscorejs.org/).

@@ -0,0 +0,0 @@ /*global document */

PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);

@@ -0,0 +0,0 @@ var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;

var db2g = require('./src/db2g');
module.exports = db2g;

6

package.json
{
"name": "db2graphql",
"version": "0.8.1",
"version": "0.9.0",
"description": "Generate Graphql schema based on existing relational database",

@@ -40,4 +40,4 @@ "main": "index.js",

"jsdoc": "^3.6.11",
"knex": "^0.21.7",
"mssql": "^8.1.2",
"knex": "^2.4.0",
"mssql": "^6.2.1",
"mysql": "^2.18.1",

@@ -44,0 +44,0 @@ "nodemon": "^2.0.6",

@@ -350,7 +350,15 @@ <p align="center">

## Collab
## Contributions
Anyone is free to collab :)
Anyone is free to contribute!
If you need an easy-to-use environment, please run the following docker containers:
```
docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=test' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge
docker run --platform=linux/amd64 --name some-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD= -d mysql:5.7
docker run --name some-postgres -p 5432:5432 -e POSTGRES_PASSWORD= -d postgres:10.6
```
Please consider the azure-sql-edge container is because M1 Macs are not supported by the official mssql container.
## License
MIT, what else?

@@ -0,0 +0,0 @@ const hash = require('string-hash-64');

@@ -81,2 +81,3 @@ const hash = require('string-hash-64');

break;
case 'datetime':
case 'timestamp with time zone':

@@ -509,2 +510,2 @@ case 'varchar':

module.exports = Mysql;
module.exports = Mysql;

@@ -0,0 +0,0 @@ const hash = require('string-hash-64');

@@ -0,0 +0,0 @@ const PostgreSQL = require('../src/adapters/postgres');

@@ -0,0 +0,0 @@ const utils = require('../utils/utils');

@@ -0,0 +0,0 @@ const utils = require('../utils/utils');

@@ -0,0 +0,0 @@

@@ -0,0 +0,0 @@ const MSSql = require('../../src/adapters/mssql');

@@ -0,0 +0,0 @@ const Mysql = require('../../src/adapters/mysql');

@@ -51,3 +51,3 @@ const PostgreSQL = require('../../src/adapters/postgres');

await adapter.convertConditionToWhereClause(query, ['<=>', 'id', 1]);
// Close connection

@@ -81,3 +81,3 @@ db.destroy(() => {

expect(/where/i.test(result.sql)).toBe(false);
// Close connection

@@ -105,3 +105,3 @@ db.destroy(() => {

expect(result.bindings[0]).toBe(val);
// Close connection

@@ -138,3 +138,3 @@ await db.destroy();

expect(/order/i.test(result.sql)).toBe(false);
// Close connection

@@ -153,3 +153,3 @@ db.destroy(() => {

expect(Array.isArray(result.rows)).toBe(true);
// Close connection

@@ -188,3 +188,3 @@ db.destroy(() => {

expect(Array.isArray(result)).toBe(true);
// Close connection

@@ -197,3 +197,3 @@ db.destroy(() => {

test('it should return a total of items', async (done) => {
// Fixtures

@@ -214,3 +214,3 @@ const schema = { foo: [] };

expect(typeof result).toBe("number");
// Close connection

@@ -246,3 +246,3 @@ db.destroy(() => {

expect(typeof result).toBe("object");
// Close connection

@@ -255,3 +255,3 @@ db.destroy(() => {

test('it should save one item and return it', async (done) => {
// Fixtures

@@ -268,3 +268,3 @@ const schema = { foo: [] };

});
const adapter = new PostgreSQL(db, schema);

@@ -274,5 +274,5 @@ let result = await adapter.putItem('foo', { input: { bar: true }, _debug: true });

expect(result.length).toBe(1);
result = await adapter.putItem('foo', { input: { id: result[0], bar: true }});
result = await adapter.putItem('foo', { input: { id: result[0].id, bar: true } });
expect(typeof result).toBe("number");
// Close connection

@@ -294,3 +294,3 @@ db.destroy(() => {

// Mock adapter query
adapter.query = async () => { return { rows: []} };
adapter.query = async () => { return { rows: [] } };
const result = await adapter.getTables();

@@ -312,3 +312,3 @@ expect(result).toEqual([]);

const adapter = new PostgreSQL();
const expected = [{ columnname: 'bar', ftableschema: 'public', ftablename: 'bar', fcolumnname: 'foo'}];
const expected = [{ columnname: 'bar', ftableschema: 'public', ftablename: 'bar', fcolumnname: 'foo' }];
adapter.query = async () => ({ rows: expected });

@@ -333,3 +333,3 @@ const result = await adapter.getForeignKeys();

// Mock adapter query
adapter.query = async () => { return { rows: []} };
adapter.query = async () => { return { rows: [] } };
let result = await adapter.getPrimaryKey();

@@ -433,3 +433,3 @@ expect(result).toEqual(null);

expect(result).toEqual(expected);
// Close connection

@@ -442,3 +442,3 @@ db.destroy(() => {

test('it should return the complete database schema as json without excluded items', async (done) => {
// Fixtures

@@ -471,3 +471,3 @@ const expected = {

expect(result).toEqual(expected);
// Close connection

@@ -474,0 +474,0 @@ db.destroy(() => {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ const db2g = require('../src/db2g');

@@ -0,0 +0,0 @@ const Compiler = require('../../src/graphql/compiler');

@@ -0,0 +0,0 @@ const Resolver = require('../../src/graphql/resolver');

@@ -0,0 +0,0 @@ const { toCamelCase } = require('../../src/utils/utils');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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