Function documentation exported on 2005/06/26 15:08:59.03. The functions in the list were obtained from source "\datalog\resources\import\database management.lua".


Index of functions

clonetag clonetags deletetags

Background

The documentation of each function is headed by a synopsis that summarizes how the function can be called. Optional parameters are surrounded with square brackets. An arbitrary number of repeats, including zero repeats, of the preceding parameter is denoted by an ellipsis (three subsequent dots). As per the Lua calling conventions, the caller is not obliged to process all results.


Function documentation

clonetag
clonetag(any:sourcedb,any:targetdb,str:tag,[str:as])
Clone a (meta)tag from one database to another. This creates a tag in the target database with the same name and configuration as the source tag.

When the tag is a set&hold tag, the initial value of the target tag is set to the last value logged to the source tag. Otherwise, the initial value is NaN in case of a number tag, and "UNDEFINED" in case of a string tag.
Parameters:
any:sourcedb, name or object of source database.
any:targetdb, name or object of target database. May be the same as the source only when an alternate tag name is provided.
str:tag, name of tag to clone.
[str:as], alternate name for the cloned tag.
Errors:
No such database.
Target database must be unlocked.
Tag does not exist in source database.
Tag already exists in target database.
Cannot clone a meta tag when parent tag does not exist.
Up to function index
clonetags
clonetags(any:sourcedb,any:targetdb,str:pattern)
Clone all tags matching the specified pattern from one database to another. Useful for creating an empty database that contains a subset of tags or all tags in a database that is being retired. See the documentation of clonetag() for further details.
Parameters:
any:sourcedb, name or object of source database.
any:targetdb, name or object of target database.
str:pattern, tag filter pattern with '?' or '*' wildcards.
Errors:
No such database.
Target database must be unlocked.
Tag already exists in target database.
Up to function index
deletetags
deletetags(any:db,str:pattern)
Delete all tags matching the specified pattern from a database. This function is highly dangerous when applied to a database containing important data.
Parameters:
any:db, name or object of database.
str:pattern, tag filter pattern with '?' or '*' wildcards.
Errors:
No such database.
Database must be unlocked.
Cannot delete a base tag when a meta tag remains in existence.
Up to function index