@rnaga/wp-node
Version:
👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**
45 lines • 1.98 kB
TypeScript
import { Alias } from "./alias";
import { QueryBuilder } from "./query-builder";
import { QueryBuilders } from "./query-builders";
import type * as types from "../types";
type ValueType = "NUMERIC" | "BINARY" | "CHAR" | "DATE" | "DATETIME" | "DECIMAL" | "SIGNED" | "TIME" | "UNSIGNED";
export declare class MetaQuery extends QueryBuilder<MetaQuery> {
#private;
alias: Alias;
protected builders: QueryBuilders;
builder: types.QueryBuilder;
private table;
private primaryTable;
private columns;
constructor(alias: Alias, builders: QueryBuilders, builder: types.QueryBuilder, table: `${types.MetaTable}meta`, primaryTable: "site" | `${Exclude<types.MetaTable, "site>">}s`, columns: {
primary: string;
meta: string;
});
setPrimaryTable(table: types.MetaTable): this;
get from(): this;
select(columns: Array<types.MetaColumns>): this;
valueType(type: ValueType): this;
joinPrimary(type?: "left" | "inner" | "right"): this;
withIds(ids: number[], options?: {
joinPrimary?: boolean;
not?: boolean;
}): this;
onNotExists(column: Extract<types.MetaColumns, "meta_key" | "meta_value">, value: string | number): this;
onExists(column: Extract<types.MetaColumns, "meta_key" | "meta_value">, value: string | number, not?: boolean): this;
private castValue;
whereKeyLike(value: string, options?: {
not: boolean;
}): this;
whereKeyNotLike(value: string): this;
whereLike(key: string, value: string | number, options?: {
not: boolean;
}): this;
whereNotLike(key: string, value: string | number): this;
whereIn(key: string, obj: Array<string | number>): this;
whereBetween(key: string, range: [number | string, number | string]): this;
withKeys(keys: string[]): this;
where(key: string, value?: string | number, op?: string): this;
regex(key: string, regex: RegExp): this;
}
export {};
//# sourceMappingURL=meta.query.d.ts.map