t_db 2.2.0 copy "t_db: ^2.2.0" to clipboard
t_db: ^2.2.0 copied to clipboard

TDB<T> is a base abstract class for a generic binary database.It is designed to provide type-safe, object-oriented (OOP) database operations for any user-defined type `T`.

2.2.0 #

  • Added: Record.count
  • Fixed Know Some Errors.

2.1.0 #

  • Fixed Know Some Errors.

2.0.0 #

  • Updated Old Core Code.
  • Fixed Know Some Errors.

1.4.0 #

  • Added setAdapterNotExists<T>
  • Added clearAdapter

1.3.0 #

  • Added db.isDataRecordCreatedExists

Added #

  final header = await db.getHeader();
  TDBHeader? staticHeader = await TDB.getHeaderFromPath('dbPath');//static method

  print(header.magic);
  print(header.type);
  print(header.version);

1.2.0 #

  • Added Database HBRelation
  • Added db.deleteAllRecord()
  • Added db.delete(T value)
  • Added db.isOpened Checker
  • Added db.stream,box.stream -> event listener

1.1.1 #

  • Fixed DBConfig.saveLocalDBLock Not Working.
  • Added db.restart() -> restart database cache
  • Added db.getOne
  • Added box.getOne
  • Added box.getById

1.0.0 #

✅ Features #

  • Pure Dart implementation — No native dependencies
  • Binary storage format — Fast read/write
  • Append‑only engine — Durable and efficient
  • Custom data type support using TDAdapter<T>
  • Auto‑increment IDs for all records
  • Box-based access similar to Hive (e.g., db.getBox<User>())
  • Query and streaming API
  • Event listeners for add/update/delete
  • Automatic compaction to reduce file size
  • Backup support during compaction

Version Compatibility #

Current Database Version: 1.0.0

Starting from version 1.0.0, the database format has been fully updated. Older database versions are no longer supported and cannot be opened or migrated automatically.

If you attempt to open a database created with a previous version, the system will reject it for compatibility and safety reasons.

Important Notes:

  • Databases created with version 1.0.0 and above are fully compatible with future releases.
  • Databases created with versions below 1.0.0 must be recreated or manually migrated.

0.2.1 #

  • Added maybeCompact -> Optional in add,addAll,update,delete
  • Added isDBInitialized -> init Usage
  • Added addAll -> Multi Add Record

0.1.0 #

  • Initial version.
0
likes
150
points
35
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

TDB<T> is a base abstract class for a generic binary database.It is designed to provide type-safe, object-oriented (OOP) database operations for any user-defined type `T`.

Repository (GitHub)
View/report issues

License

MIT (license)

More

Packages that depend on t_db