@rnaga/wp-node
Version:
👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**
30 lines • 1.68 kB
TypeScript
import { Alias } from "./alias";
import { QueryBuilder } from "./query-builder";
import { QueryBuilders } from "./query-builders";
import { TermsQuery } from "./terms.query";
import type * as types from "../types";
export declare class PostsQuery extends QueryBuilder<PostsQuery> {
alias: Alias<"cte_p" | "p" | "p2" | "cte_c" | "c" | "c2">;
protected builders: QueryBuilders;
builder: types.QueryBuilder;
readonly table = "posts";
constructor(alias: Alias<"cte_p" | "p" | "p2" | "cte_c" | "c" | "c2">, builders: QueryBuilders, builder: types.QueryBuilder);
get from(): this;
get(id: number): this;
withMeta(type?: "inner" | "right"): this;
withoutMeta(key: string, value?: string): this;
withChildren(id: number): this;
withParents(id: number): this;
select(columns: Array<types.Columns<"posts"> | types.Columns<"postmeta">>): this;
whereIn(column: types.Columns<"posts"> | "meta_key" | "meta_value", values: Array<string | number>): this;
where(column: types.Columns<"posts"> | "meta_key" | "meta_value", value: string | number | Array<string | number>, op?: string): this;
whereLike(column: types.Columns<"posts">, value: string, options?: {
not: boolean;
}): this;
whereNotLike(column: types.Columns<"posts">, value: string): this;
countPublished(postType?: string): this;
withTerms(taxonomies: types.TaxonomyName[], fn?: (query: TermsQuery) => void): this;
countTerm(termTaxonomyId: number, postStatuses: types.PostStatus[], postTypes: types.PostType[]): this;
countAttachment(termTaxonomyId: number, postStatues: types.PostStatus[]): this;
}
//# sourceMappingURL=posts.query.d.ts.map