CliConnectionProvider class
Dynamic connection provider for headless CLI execution and standalone automation pipelines.
Supports parsing local JSON config files, expanding environment variables (${VAR_NAME}),
executing native read-only queries against local SQLite files and ClickHouse HTTP endpoints,
or delegating to an injected liveQueryExecutor.
- Implemented types
Constructors
- CliConnectionProvider({CliLiveQueryExecutor? liveQueryExecutor})
Properties
-
activeConnectionIds
→ List<
String> -
Active connection IDs attached in the pool.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- liveQueryExecutor → CliLiveQueryExecutor?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
executeQueryOnConnection(
String connectionId, String query, {int maxRows = 500}) → Future< List< Map< >String, dynamic> > -
Executes an isolated query payload on the specified target connection ID.
override
-
getConnectionName(
String connectionId) → String? -
Retrieves optional display name for a connection ID.
override
-
getDescriptor(
String connectionId) → CliConnectionDescriptor? -
Retrieves the registered CliConnectionDescriptor for
connectionId. -
getEngineType(
String connectionId) → DbEngineType? -
Retrieves the database engine type for a connection ID.
override
-
getSchemaOverview(
String connectionId) → Map< String, dynamic> ? -
Retrieves the schema overview (table/collection names and structures) for a connection ID.
override
-
loadFromConfigFile(
File configFile) → void - Loads database connections from a file path.
-
loadFromJsonString(
String jsonContent) → void - Loads connections from a JSON string representation.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerConnection(
{required String id, required String name, required DbEngineType engineType, required String connectionString, required Map< String, dynamic> schemaOverview, List<Map< ? mockData}) → voidString, dynamic> > - Manually registers a database connection descriptor.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
expandEnvVars(
String input) → String -
Expands environment variables in the format
${VAR_NAME}using current OS environment bindings.