template dbFormatImpl(formatstr: SqlQuery; dbQuote: proc (s: string): string; args: varargs[string]): string