@clickup/pg-microsharding
Version:
Microshards support for PostgreSQL
30 lines • 960 B
TypeScript
export type Value = string | number | null | Sql | Ident;
/**
* Quotes the value to be used as a shell argument.
*/
export declare function shellQuote(s: string): string;
/**
* Builds a compound SQL statement from a typed template string literal. All SQL
* clauses built by this helper will have newlines removed.
*/
export declare function sql(strings: readonly string[], ...values: readonly Value[]): Sql;
/**
* Builds a PG identifier from a string.
*/
export declare function ident(name: string): Ident;
/**
* Joins multiple compound SQL statements.
*/
export declare function join(sqls: ReadonlyArray<Sql | Ident | string>, sep: string): Sql;
export declare class Ident {
private name;
constructor(name: string);
toString(): string;
}
export declare class Sql {
private strings;
private values;
constructor(strings: readonly string[], values: readonly Value[]);
toString(): string;
}
//# sourceMappingURL=quote.d.ts.map