MCPcopy
hub / github.com/drizzle-team/drizzle-orm / all

Method all

drizzle-orm/src/d1/session.ts:207–220  ·  view source on GitHub ↗
(placeholderValues?: Record<string, unknown>)

Source from the content-addressed store, hash-verified

205 }
206
207 async all(placeholderValues?: Record<string, unknown>): Promise<T['all']> {
208 const { fields, query, logger, stmt, customResultMapper } = this;
209 if (!fields && !customResultMapper) {
210 const params = fillPlaceholders(query.params, placeholderValues ?? {});
211 logger.logQuery(query.sql, params);
212 return await this.queryWithCache(query.sql, params, async () => {
213 return stmt.bind(...params).all().then(({ results }) => this.mapAllResult(results!));
214 });
215 }
216
217 const rows = await this.values(placeholderValues);
218
219 return this.mapAllResult(rows);
220 }
221
222 override mapAllResult(rows: unknown, isFromBatch?: boolean): unknown {
223 if (isFromBatch) {

Callers 15

turso.test.tsFile · 0.45
index.test.tsFile · 0.45
sqlite.test.tsFile · 0.45
batchMethod · 0.45
queryMethod · 0.45
testsFunction · 0.45
libsql.test.tsFile · 0.45
sql-js.test.tsFile · 0.45

Calls 5

mapAllResultMethod · 0.95
valuesMethod · 0.95
fillPlaceholdersFunction · 0.90
logQueryMethod · 0.65
thenMethod · 0.45

Tested by 3

batchMethod · 0.36
queryMethod · 0.36
queryMethod · 0.36