Index  Up  <<  >>  


Write Control

MiniVend databases can be written in the normal course of events, either using the [import ...] tag or with a tag like [data table=table column=field key=code value=new-value].

If you wish to control writing of a global database, or to a certain catalog within a series of subcatalogs, or make one read only, you can do so.

To enable write control:

    Database   products  WRITE_CONTROL  1

Once that is done, you can make a database read only, which won't allow writing even if [tag flag write]products[/tag] is specified:

    Database   products  READ_ONLY  1

If you want to have control with [tag flag write]products[/tag]:

    Database   products  WRITE_TAGGED  1

If you want to limit write to certain catalogs, you can set:

    Database   products  WRITE_CATALOG  simple=0, sample=1

The ``simple'' catalog will not be able to write, while ``sample'' will if [tag flag write]products[/tag] is enabled.

If you want a database to be always writable without having to specify [tag flag write] ... [/tag], then you can define:

    Database   products  WRITE_ALWAYS  1

The default behavior of SQL datbases is equivalent to WRITE_ALWAYS, while the default for GDBM_File, DB_File, and Memory databases is equivalent to:

    Database   products  WRITE_CONTROL 1
    Database   products  WRITE_TAGGED  1


Index  Up  <<  >>