db
Property delegate that triggers auto-population from the database on first access. Use with AutoTable entities: properties delegated to db will lazily load the entity's data when read or written for the first time.
class User : AutoTable() {
var name: String by db("")
}Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Delegate write: marks the owning AutoTable as user-touched so it is no longer considered a stub (which prevents a subsequent read from triggering lazy-load), then stores the new value in memory. No immediate database write.