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

Method prepareQuery

drizzle-orm/src/gel/session.ts:128–152  ·  view source on GitHub ↗
(
		query: Query,
		fields: SelectedFieldsOrdered | undefined,
		name: string | undefined,
		isResponseInArrayMode: boolean,
		customResultMapper?: (rows: unknown[][]) => T['execute'],
		queryMetadata?: {
			type: 'select' | 'update' | 'delete' | 'insert';
			tables: string[];
		},
		cacheConfig?: WithCacheConfig,
	)

Source from the content-addressed store, hash-verified

126 }
127
128 prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(
129 query: Query,
130 fields: SelectedFieldsOrdered | undefined,
131 name: string | undefined,
132 isResponseInArrayMode: boolean,
133 customResultMapper?: (rows: unknown[][]) => T['execute'],
134 queryMetadata?: {
135 type: 'select' | 'update' | 'delete' | 'insert';
136 tables: string[];
137 },
138 cacheConfig?: WithCacheConfig,
139 ): GelDbPreparedQuery<T> {
140 return new GelDbPreparedQuery(
141 this.client,
142 query.sql,
143 query.params,
144 this.logger,
145 this.cache,
146 queryMetadata,
147 cacheConfig,
148 fields,
149 isResponseInArrayMode,
150 customResultMapper,
151 );
152 }
153
154 override async transaction<T>(
155 transaction: (tx: GelTransaction<GelQueryResultHKT, TFullSchema, TSchema>) => Promise<T>,

Callers 11

executeMethod · 0.45
executeFunction · 0.45
allFunction · 0.45
_prepareMethod · 0.45
_prepareMethod · 0.45
_prepareMethod · 0.45
_prepareMethod · 0.45
_prepareMethod · 0.45
_prepareMethod · 0.45
queryFunction · 0.45
proxyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected