readSchemaDef method
Read the database schema definition
Implementation
Future<SdbDatabaseSchemaDef> readSchemaDef() {
var schema = _impl.schema;
if (schema == null) {
throw StateError('Database was not opened with a schema');
}
var stores = storeNames;
return inStoresTransaction(
stores
.map((storeName) => schema.findStoreSchema(storeName))
.map((schema) => schema.ref)
.toList(),
SdbTransactionMode.readOnly,
(txn) {
return txnReadSchemaDef(txn);
},
);
}