DatabaseConnection (api/connection.dart)

drift · drift/lib/src/runtime/api/connection.dart · dart · MIT
database

Manages database connections and query streams for Drift ORM applications.

// Source: https://github.com/simolus3/drift | License: MIT | Copyright 2019 Simon Binder
// Provided via justclaw.it.com; keep this notice with the code.
part of 'runtime_api.dart';

/// A database connection managed by drift. This consists of two components:
///
/// - a [QueryExecutor], which runs sql statements.
/// - a [StreamQueryStore], which dispatches table changes to listening queries,
///   on which the auto-updating queries are based.
@pragma('drift:v3-rename', 'DriftConnection')
class DatabaseConnection implements QueryExecutor {
  /// The executor to use when queries are executed.
  final QueryExecutor executor;

  /// Manages active streams from select statements.
  final StreamQueryStore streamQueries;

  /// Optional data attached to this connection.
  ///
  /// This is mos

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key