waterlinejs/postgresql-adapter

View on GitHub
lib/adapter.js

Summary

Maintainability
C
1 day
Test Coverage

File adapter.js has 366 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import Knex from 'knex'
import _ from 'lodash'
import camelize from 'camelize'
import WaterlineSequel from 'waterline-sequel'

Severity: Minor
Found in lib/adapter.js - About 4 hrs to fix

    Adapter has 23 functions (exceeds 20 allowed). Consider refactoring.
    Open

    const Adapter = {
    
      identity: 'waterline-postgresql',
    
      wlSqlOptions: {
    Severity: Minor
    Found in lib/adapter.js - About 2 hrs to fix

      Function registerConnection has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        registerConnection (connection, collections, cb) {
          if (!connection.identity) {
            return cb(WaterlineError.adapter.IdentityMissing)
          }
          if (Adapter.connections.get(connection.identity)) {
      Severity: Minor
      Found in lib/adapter.js - About 1 hr to fix

        Function addAttribute has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          addAttribute (connectionName, tableName, attributeName, definition, cb) {
        Severity: Minor
        Found in lib/adapter.js - About 35 mins to fix

          Function query has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            query (connectionName, tableName, queryString, args, cb) {
          Severity: Minor
          Found in lib/adapter.js - About 35 mins to fix

            Function update has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              update (connectionName, tableName, options, data, cb) {
            Severity: Minor
            Found in lib/adapter.js - About 35 mins to fix

              There are no issues that match your filters.

              Category
              Status