Table of Contents

Interface IPostgrestClient

Namespace
Supabase.Postgrest.Interfaces
Assembly
Supabase.Postgrest.dll

Client interface for Postgrest

public interface IPostgrestClient : IGettableHeaders
Inherited Members

Properties

BaseUrl

API Base Url for subsequent calls.

string BaseUrl { get; }

Property Value

string

Options

The Options Client was initialized with.

ClientOptions Options { get; }

Property Value

ClientOptions

Methods

AddDebugHandler(DebugEventHandler)

Adds a debug handler

void AddDebugHandler(IPostgrestDebugger.DebugEventHandler handler)

Parameters

handler IPostgrestDebugger.DebugEventHandler

AddRequestPreparedHandler(OnRequestPreparedEventHandler)

Adds a handler that is called prior to a request being sent.

void AddRequestPreparedHandler(OnRequestPreparedEventHandler handler)

Parameters

handler OnRequestPreparedEventHandler

ClearDebugHandlers()

Clears debug handlers

void ClearDebugHandlers()

ClearRequestPreparedHandlers()

Clears all OnRequestPreparedEventHandler handlers.

void ClearRequestPreparedHandlers()

RemoveDebugHandler(DebugEventHandler)

Removes a debug handler

void RemoveDebugHandler(IPostgrestDebugger.DebugEventHandler handler)

Parameters

handler IPostgrestDebugger.DebugEventHandler

RemoveRequestPreparedHandler(OnRequestPreparedEventHandler)

Removes an OnRequestPreparedEventHandler handler.

void RemoveRequestPreparedHandler(OnRequestPreparedEventHandler handler)

Parameters

handler OnRequestPreparedEventHandler

Rpc(string, object?)

Perform a stored procedure call.

Task<BaseResponse> Rpc(string procedureName, object? parameters)

Parameters

procedureName string

The function name to call

parameters object

The parameters to pass to the function call

Returns

Task<BaseResponse>

Rpc<TModeledResponse>(string, object?)

Perform a stored procedure call.

Task<TModeledResponse?> Rpc<TModeledResponse>(string procedureName, object? parameters = null)

Parameters

procedureName string

The function name to call

parameters object

The parameters to pass to the function call

Returns

Task<TModeledResponse>

A hydrated model

Type Parameters

TModeledResponse

A type used for hydrating the HTTP response content (hydration through JSON.NET)

Table<T>()

Returns a Table Query Builder instance for a defined model - representative of USE $TABLE

IPostgrestTable<T> Table<T>() where T : BaseModel, new()

Returns

IPostgrestTable<T>

Type Parameters

T

Custom Model derived from BaseModel

Table<T>(IPostgrestCacheProvider)

Returns a Table Query Builder instance with a Cache Provider for a defined model - representative of USE #$TABLE

IPostgrestTableWithCache<T> Table<T>(IPostgrestCacheProvider cacheProvider) where T : BaseModel, new()

Parameters

cacheProvider IPostgrestCacheProvider

Returns

IPostgrestTableWithCache<T>

Type Parameters

T