iccicci/sedentary-pg

View on GitHub

Showing 6 of 12 total issues

File local.ts has 578 lines of code (exceeds 500 allowed). Consider refactoring.
Open

import { DatabaseError, Pool } from "pg";

if(! process.env.SPG) throw "Missing SPG!";

const v10 = process.version.startsWith("v10");
Severity: Major
Found in test/local.ts - About 3 hrs to fix

    PGDB has 22 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export class PGDB extends DB<TransactionPG> {
      private _client: PoolClient = {} as PoolClient;
      private indexes: string[] = [];
      private oidLoad: Record<number, (ids: Natural[]) => Promise<EntryBase[]>> = {};
      private pool: Pool;
    Severity: Minor
    Found in pgdb.ts - About 2 hrs to fix

      Avoid deeply nested control flow statements.
      Open

                  if(adsrc) dropDefault();
      Severity: Major
      Found in pgdb.ts - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                    if(this.sync) await this._client.query(statement);
        Severity: Major
        Found in pgdb.ts - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                  } else if(! adsrc || this.defaultNeq(adsrc, defaultValue)) await setDefault(attnotnull);
          Severity: Major
          Found in pgdb.ts - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                      if(adsrc) dropDefault();
            Severity: Major
            Found in pgdb.ts - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language