Index  Up  <<  >>  


Arbitrary Databases

MiniVend can manage an unlimited number of arbitrary database tables. They are in the same format as the products file by default, but an unlimited number of addressable schemes are available. These are defined by default:

    Type 1      DEFAULT - uses default delimiter set by Delimiter
    Type 2      LINE
                Each field on its own line, a blank line
                separates the record. Watch those carriage
                returns! Also has a special format when CONTINUE
                is set to be NOTES.
    Type 3      %%
                Fields separated by a \n%%\n combination, records by
                \n%%%\n (where \n is a newline). Watch those carriage
                returns!
    Type 4      CSV
    Type 5      PIPE
    Type 6      TAB
    Type 7      mSQL
    Type 8      SQL

The databases are specified in Database directives, as:

    Database    Arbitrary arbitrary.csv CSV

That specifies a type 4 database, the ASCII version of which is located in the file arbitrary.csv, and the identifier it will be accessed under in MiniVend is ``Arbitrary''. The DBM file, if any, will be created in the same directory if the ASCII file is newer, or if the DBM file does not exist. The files will be created as arbitrary.db or arbitrary.gdbm, depending on DBM type.

The identifier is case sensitive, and can only contain characters in the class [A-Za-z0-9_]. Fields are accessed with the [item_data identifier field] or [data identifier field key] elements.


Index  Up  <<  >>