SqliteWrapperGRPC class
gRPC implementation of SQLiteWrapperBase.
Connects to a remote sqlite_wrapper_server via gRPC. Must be created with SqliteWrapperGRPC.withHostAndPort.
- Inheritance
-
- Object
- SQLiteWrapperBase
- SqliteWrapperGRPC
Constructors
- SqliteWrapperGRPC.withHostAndPort({String host = 'localhost', int port = 50051, bool secure = false})
Properties
- authClient → AuthClient
-
no setter
- client → SqliteWrapperServiceClient
-
no setter
- clientOverride ↔ SqliteWrapperServiceClient?
-
getter/setter pair
- databases → Databases
-
finalinherited
- debugMode ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
streams
→ List<
StreamInfo> -
finalinherited
- token ← String
-
no getter
Methods
-
closeDB(
{String? dbName}) → Future< void> -
Close the Database and clean up its streams.
override
-
delete(
Map< String, dynamic> map, String table, {required List<String> keys, String? dbName}) → Future<int> -
Delete rows matching
keysfrommap. Returns the number of deleted rows.inherited -
echo(
String message) → Future< String> -
execute(
String sql, {List< String> ? tables, List<Object?> params = const [], String? dbName}) → Future -
Executes an SQL statement.
override
-
executeBatch(
List< String> sqls, {List<List< ? paramsList, List<Object?> >String> ? dbName, List<List< ? tablesList}) → Future<String> >List> -
Execute a batch of SQL statements in a single round-trip (gRPC) or
sequentially (native). Each statement is processed through execute
so INSERT/UPDATE/DELETE return their scalar result.
override
-
fixBoolParams(
List< Object?> params) → List<Object?> -
Convert booleans to integers (true=1, false=0) in a new list.
Does not mutate the original
paramslist.inherited -
getDatabase(
{String? dbName}) → DatabaseCore? -
Returns the internal DatabaseCore instance for the given db name.
Handle with care: exposes the underlying database adapter.
override
-
getDatabases(
) → Databases -
Expose the databases object.
inherited
-
getVersion(
{String? dbName}) → Future< int> -
override
-
initServiceManager(
{String host = 'localhost', int port = 50051, bool secure = false}) → void -
insert(
Map< String, dynamic> map, String table, {String? dbName}) → Future<int> -
Insert a new record from
mapintotable. Returns the new row id.inherited -
isWeb(
) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openDB(
String path, {int version = 0, OnCreate? onCreate, OnUpgrade? onUpgrade, String? dbName, bool useGRPC = false}) → Future< DatabaseInfo> -
Open the Database and returns DatabaseInfo with creation status and version.
override
-
query(
String sql, {List< Object?> params = const [], FromMap? fromMap, bool singleResult = false, String? dbName}) → Future -
Executes a query and returns the results.
inherited
-
save(
Map< String, dynamic> map, String table, {List<String> ? keys, String? dbName}) → Future<int> -
Insert or update depending on whether a row with the same key exists (UPSERT).
Returns the row id.
inherited
-
setVersion(
int version, {String? dbName}) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
transaction<
T> (Future< T> action(), {String? dbName}) → Future<T> -
Execute
actioninside a database transaction.inherited -
update(
Map< String, dynamic> map, String table, {required List<String> keys, String? dbName}) → Future<int> -
Update a row identified by
keyswith values frommap. Returns the number of affected rows.inherited -
updateStreams(
List< String> ? tables) → Future<void> -
Refresh streams that watch any of the
tables. Iftablesis null, all streams are refreshed.inherited -
watch(
String sql, {List< Object?> params = const [], FromMap? fromMap, bool singleResult = false, required List<String> tables, String? dbName}) → Stream -
Returns a Stream that emits results of
sqlwhenevertableschange.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited