attach method

  1. @override
void attach(
  1. DbName dbName,
  2. String dbAlias
)
override

Some drivers can attach other open databases and reference them by alias (i.e.: first you attach('foo.db') then you can write SQL queries like select * from foo.bars. We keep track of attached databases and their aliases, so we can map the table namespaces in SQL queries to their real database names and thus emit and handle notifications to and from them.

Implementation

@override
void attach(DbName dbName, String dbAlias) {
  final idx = attachedDbIndex;

  idx.byAlias[dbAlias] = dbName;
  idx.byName[dbName] = dbAlias;
}