ash_cubdb/documentation/dsls/DSL:-AshCubDB.DataLayer.md
James Harton 6a7344edb6
All checks were successful
continuous-integration/drone/push Build is passing
docs: Update documentation and documentation configuration.
Thanks Zach!
2024-01-15 10:19:59 +13:00

3.1 KiB

DSL: AshCubDB.DataLayer

A CubDB data layer for Ash.

DSL Documentation

Index

  • cubdb

Docs

cubdb

CubDB data layer configuration.

Examples:

cubdb do
  directory "/opt/storage/my_awesome_resource"
  auto_compact? true
  auto_file_sync? true
  name :my_awesome_resource
end


  • :directory - The directory within which to store the CubDB data.
    If none is supplied, then one will be automatically generated in the priv directory of the parent OTP application.

  • :otp_app (t:atom/0) - The OTP application in whose priv directory data should be stored.
    Only used if directory is not supplied. When not provided Application.get_application/1 will be called for the resource.

  • :auto_compact? (t:boolean/0) - Whether or not to automatically compact the CubDB database.
    See the CubDB documentation for more information. The default value is true.

  • :auto_file_sync? (t:boolean/0) - Whether or not to automatically flush the buffer to disk on write.
    See the CubDB documentation The default value is true.

  • :name (t:atom/0) - The name of the CubDB database.
    By default this is the name of the resource module, however in some (rare) circumstances you may wish to specifically name the database.

cubdb

CubDB data layer configuration.

Examples

cubdb do
  directory "/opt/storage/my_awesome_resource"
  auto_compact? true
  auto_file_sync? true
  name :my_awesome_resource
end

Options

Name Type Default Docs
directory{: #cubdb-directory } nil | String.t The directory within which to store the CubDB data. If none is supplied, then one will be automatically generated in the priv directory of the parent OTP application.
otp_app{: #cubdb-otp_app } atom The OTP application in whose priv directory data should be stored. Only used if directory is not supplied. When not provided Application.get_application/1 will be called for the resource.
auto_compact?{: #cubdb-auto_compact? } boolean true Whether or not to automatically compact the CubDB database. See the CubDB documentation for more information.
auto_file_sync?{: #cubdb-auto_file_sync? } boolean true Whether or not to automatically flush the buffer to disk on write. See the CubDB documentation
name{: #cubdb-name } atom The name of the CubDB database. By default this is the name of the resource module, however in some (rare) circumstances you may wish to specifically name the database.