Table of Contents

Method Get

Namespace
PowerSync.Common.MDSQLite
Assembly
PowerSync.Common.dll

Get(string, object?[]?)

Executes a read-only query and returns the first row. Throws if there are no rows.

public Task<IQueryRow> Get(string sql, object?[]? parameters = null)

Parameters

sql string
parameters object[]

Returns

Task<IQueryRow>

Get<T>(string, object?[]?, SqlMapper<T>)

Executes a read-only query and returns the first row mapped using mapper. Throws if there are no rows.

public Task<T> Get<T>(string sql, object?[]? parameters, SqlMapper<T> mapper)

Parameters

sql string
parameters object[]
mapper SqlMapper<T>

Returns

Task<T>

Type Parameters

T

Get<T>(string, object?[]?)

Executes a read-only query and returns the first row mapped using T.FromRow. Throws if there are no rows.

public Task<T> Get<T>(string sql, object?[]? parameters = null) where T : IFromRow<T>

Parameters

sql string
parameters object[]

Returns

Task<T>

Type Parameters

T