class

Folio

const abstract class Folio : Obj

Folio database

constructors make

Sub-class constructor

fields config

Configuration used to init database

dir

Home directory for this database

log

Logging for this database

name

Name of this database

methods backup

Backup APIs

close

Close the database synchronously (block until closed)

closeAsync

Close the database asynchronously and return future

commit

Convenience for commitAll with a single diff

commitAll

Apply a list of diffs to the database in batch

commitAllAsync

Commit a list of diffs to the database asynchronously

commitAsync

Convenience for commitAllAsync with a single diff

passwords

Get storage for passwords and other secrets

read

Find the first record which matches the given filter

readAll

Match all the records against a filter and return as grid

readAllList

Match all the records against a filter and return as list

readById

Read record by id

readByIds

Read a list of records by ids into a grid

readByIdsList

Read a list of records by id

readCount

Return the number of records which match given filter

backup abstract FolioBackup backup()

Backup APIs

close Void close(Duration? timeout := null)

Close the database synchronously (block until closed)

closeAsync FolioFuture closeAsync()

Close the database asynchronously and return future

commit Diff commit(Diff diff)

Convenience for commitAll with a single diff.

commitAll Diff[] commitAll(Diff[] diffs)

Apply a list of diffs to the database in batch. Either all the changes are successfully applied, or else none of them are applied and an exception is raised. Return updated Diffs which encapsulate both the old and new version of each record.

If any of the records have been modified since they were read for the given change set then ConcurrentChangeErr is thrown unless Diff.force configured.

commitAllAsync FolioFuture commitAllAsync(Diff[] diffs)

Commit a list of diffs to the database asynchronously.

commitAsync FolioFuture commitAsync(Diff diff)

Convenience for commitAllAsync with a single diff.

config const FolioConfig : config

Configuration used to init database

dir const File : dir

Home directory for this database

log const Log : log

Logging for this database

make new make(FolioConfig config)

Sub-class constructor

name const Str : name

Name of this database

passwords abstract PasswordStore passwords()

Get storage for passwords and other secrets

read Dict? read(Filter filter, Bool checked := true)

Find the first record which matches the given filter. If checked is true, throw UnknownRecErr if none found. Or if checked is false return null. Recs missing read permission in current context are silently excluded from the match; a PermissionErr is never thrown.

readAll Grid readAll(Filter filter, Dict? opts := null)

Match all the records against a filter and return as grid. Recs missing read permission in current context are silently excluded; a PermissionErr is never thrown.

Options:

  • limit: max number of recs to read
  • search: search string to apply in addition to filter
  • sort: marker tag to sort recs by dis string
  • gridMeta: Dict to use for grid meta

readAllList Dict[] readAllList(Filter filter, Dict? opts := null)

Match all the records against a filter and return as list. This method uses same options and security semantics as readAll.

readById Dict? readById(Ref id, Bool checked := true)

Read record by id. If checked is true, throw UnknownRecErr if not found, or throw PermissionErr if missing read permission in current context. Or if checked is false return null in those cases.

readByIds Grid readByIds(Ref[] ids, Bool checked := true)

Read a list of records by ids into a grid. The rows in the result correspond by index to the ids list. If checked is true, throw UnknownRecErr if any id is not found, or throw PermissionErr if missing read permission in current context. Or if checked is false return a row with every column set to null (including the id tag) in those cases.

readByIdsList Dict?[] readByIdsList(Ref[] ids, Bool checked := true)

Read a list of records by id. The resulting list matches the list of ids by index. If checked is true, throw UnknownRecErr if any id is not found, or throw PermissionErr if missing read permission in current context. Or if checked is false return null for those items.

readCount Int readCount(Filter filter, Dict? opts := null)

Return the number of records which match given filter. This method supports the same options and security semantics as readAll.

Haxall 4.0.7 ∙ 27-Oct-2026 09:10 EDT