Repo is from where you connect to your data or updates the structure of your data.
close Boolean Close the repository. This bust be done before opening a new one as only one can be open at the time. createdql(name) DQL Create and return a DQL object. createmultiview(name) MultiView Create and return a MultiView deletetable(name) Boolean Delete a table in the repository. Return true if successful. execdql(
Str Exexute a dql and return the result as a string. Depending of if you use a template or not, you will get a csv or a string build on the template. The template engine used here, is the very simple DataEase 8 version and not the new server version found in DataEase 9. getdateformat Str Based on the setting in prism you get MM/DD/YYYY, DD/MM/YYYY or YYYY/MM/DD where / is replaced by the separator used by prism. getdateseparator Str The date separator used by prism getdatestandard Str The date standard used by prism. Can be:
1 North American MM/DD/YY
2 International DD/MM/YY
3 Metric YY/MM/DD
getdesimalseparator Str The separator used for decimal in floating point and decimal numbers getlasterror Int The last error code returned from a prism call getlasterrorasstring Str The error as formatted by prism. getletter Str The letter used for RDRRxAAA.INI and the like. x is then replaced by this letter. gettable PrismTable Set up a multiview for given name with given filters and return a PrismTable class that can be used for manipulating data by read, create, delete or update records in the table.
- tdf | name of the table or a tdf returned form another table to be used for creating the multiview
- filter | filter to use on the multiview when query data for read, update or delete. The format of the filter can be Str, dict, OrderedDict, list or tuple.
- order | this is if you want to send the order commands separately from the filter as when using raw filters. Takes a tuple or list of tuple or list. The inner one takes two values, the key and sort order. Sort order can be > or in order for ascending and < or in reverse for descending
Filter as string have two modes, raw and url. The raw when string starts with = or not start with ?. Url mode is when is start with ?.
- raw mode | you write the filter as you would in DataEase
- Url mode | take string from pos 1 and split it on every & then split all of these at = an add them to a OrderedDict as key value pairs and pass it on to OrderedDict version of query. (TODO: Should we rewrite url mode to Server url mode with ?DEQuery&key1=val1&key2=val2? We also need to extend this to add key=in order and key=in reverse as we have in server)
Filter as dict will generate the query based on the key value pairs that have a match in tdf wit rules on sort using key=> for ascending and key=< for descending. Key is then the field name.
Filter as tuple or list use another model for setting queries. It use set column filter method that works as the select where you write into fields. The list or string should consist of elements with a list/tuple of 2 values where the first is the field name and the other sort or query or both. As for dict model => is ascending and =< is descending.
getthousandseparator Str The separator used for triplets in a number. Ex 1 000.23 for thousand point twenty three gettimeformat Str HH:MM:SS where the : is replaced by the separator used by prism gettimeseparator Str The separator used by time isopen Boolean Return True if the repo is open listcommands List Return a string list of all commands supported by DQL listfunctions List Return a string list of all functions supported by DataEase listoperators List Return a list of all operators supported by DQL listtablenames List Return a list of all tables in repository runfunction Str Call into DPRunFunction with a function name and 0-8 args and return the result.