@@ -2,7 +2,6 @@ import pg from "pg";
22import Cursor from "pg-cursor" ;
33import { type QueryResult , query , queryOne , queryOnlyOne } from "./query.js" ;
44import { cursorRowConverter } from "./query.js" ;
5- import { oneFn , onlyOneFn , queryFn } from "./queryFn.js" ;
65import { sql } from "./sql.js" ;
76import { tx } from "./tx.js" ;
87
@@ -95,30 +94,6 @@ export class DB implements Queryable {
9594 }
9695 }
9796
98- queryFn < T extends object , P = Record < string , unknown > > (
99- strings : TemplateStringsArray ,
100- ...argsIn : ( keyof P ) [ ]
101- ) {
102- const fn = queryFn ( strings , ...argsIn ) ;
103- return ( props : P , tx ?: Queryable ) => fn ( props , tx || this ) ;
104- }
105-
106- oneFn < T extends object , P = Record < string , unknown > > (
107- strings : TemplateStringsArray ,
108- ...argsIn : ( keyof P ) [ ]
109- ) {
110- const fn = oneFn ( strings , ...argsIn ) ;
111- return ( props : P , tx ?: Queryable ) => fn ( props , tx || this ) ;
112- }
113-
114- onlyOneFn < T extends object , P = Record < string , unknown > > (
115- strings : TemplateStringsArray ,
116- ...argsIn : ( keyof P ) [ ]
117- ) {
118- const fn = onlyOneFn ( strings , ...argsIn ) ;
119- return ( props : P , tx ?: Queryable ) => fn ( props , tx || this ) ;
120- }
121-
12297 cursor ( rowCount = 100 ) {
12398 const pool = this . pool ;
12499
0 commit comments