harperdb
Version:
HarperDB is a distributed database, caching service, streaming broker, and application development platform focused on performance and ease of use.
51 lines (50 loc) • 1.9 kB
TypeScript
import type { UserRoleDatabasePermissions } from '../security/user.ts';
import type { Conditions, Id, Select, Sort } from './ResourceInterface.ts';
export declare class RequestTarget extends URLSearchParams {
#private;
pathname: string;
search?: string;
/** Target a specific record, but can be combined with select */
id?: Id;
/** Indicates that this is a request to query for collection of records */
isCollection?: boolean;
/** The conditions to use in the query, that the returned records must satisfy */
conditions?: Conditions;
/** The number of records to return */
limit?: number;
/** The number of records to skip */
offset?: number;
/** The number of operator to use*/
operator?: 'AND' | 'OR';
/** The sort attribute and direction to use */
/** @ts-expect-error USP has a sort method, we hide it */
sort?: Sort;
/** The selected attributes to return */
select?: Select;
/** Return an explanation of the query order */
explain?: boolean;
/** Force the query to be executed in the order of conditions */
enforceExecutionOrder?: boolean;
lazy?: boolean;
parseError?: Error;
noCacheStore?: boolean;
noCache?: boolean;
onlyIfCached?: boolean;
staleIfError?: boolean;
mustRevalidate?: boolean;
replicateTo?: string[];
replicateFrom?: boolean;
replicatedConfirmation?: number;
originatingOperation?: string;
previousResidency?: string[];
checkPermission?: UserRoleDatabasePermissions | boolean;
allowFullScan?: boolean;
allowConditionsOnDynamicAttributes?: boolean;
constructor(target?: string);
toString(): string;
get url(): string;
delete(name: string): void;
set(name: string, value: string): void;
append(name: string, value: string): void;
}
export type RequestTargetOrId = RequestTarget | Id;