MCPcopy Create free account
hub / github.com/damms005/devdb-vscode / buildWhereClause

Method buildWhereClause

src/database-engines/sqlite-engine.ts:516–529  ·  view source on GitHub ↗
(whereClause: Record<string, any>, columns: Column[])

Source from the content-addressed store, hash-verified

514 }
515
516 private buildWhereClause(whereClause: Record<string, any>, columns: Column[]): { whereString: string; whereParams: any[] } {
517
518 const wheres: string[] = []
519 const whereParams: any[] = []
520
521 const clause = buildWhereClause(this, 'sqlite3', whereClause, columns)
522
523 for (const entry of clause) {
524 wheres.push(`${entry.column} ${entry.operator} ?`)
525 whereParams.push(entry.value)
526 }
527
528 return { whereString: wheres.join(' AND '), whereParams }
529 }
530
531 private transformValueForSqlite(value: any): any {
532 if (value === null || value === undefined) {

Callers 3

getTotalRowsMethod · 0.95
getRowsMethod · 0.95
sql.test.tsFile · 0.80

Calls 1

buildWhereClauseFunction · 0.90

Tested by

no test coverage detected