Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Skyler Lewis committed Sep 12, 2023
1 parent 1b5f9d6 commit 66e2f42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 53 deletions.
50 changes: 0 additions & 50 deletions src/db/index.ts

This file was deleted.

5 changes: 5 additions & 0 deletions src/queryBuilder/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ export class BaseTable {
public joinColumn: string = "id"
) {}
}

/** HELPERS */
type Dictionary<T = any> = Record<string, T>;

/**
* A class representing a query builder for Squeakql.
* This can only build SELECT queries.
*/
export class QueryBuilder {
public baseTable: BaseTable;
public columns: SqueakqlQuery[] = [];
Expand Down
5 changes: 2 additions & 3 deletions src/string-literal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
arrayEnsure as ensureArray,
keyObjArray,
} from "../ts-utils/array/array-ensure";
import { dbQuery } from "./db";
import { objectPrune as pruneObject } from "../ts-utils/object/object-prune";

/** HELPERS */
Expand Down Expand Up @@ -98,7 +97,7 @@ sql.updateMany = async <
table: string,
vals: Dictionary<K>,
arrayType?: SqueakqlQuery
): Promise<T[]> => {
) => {
let columns = [];
let columns_set = false;
let all_vals = [];
Expand Down Expand Up @@ -139,5 +138,5 @@ sql.updateMany = async <
columns.map((c) => sql`:${c}`)
)}) WHERE d.id=v.id`;

return await dbQuery(query);
return query;
};

0 comments on commit 66e2f42

Please sign in to comment.