4/12/2023 0 Comments Gnucash sql![]() ![]() These are user-facing, visible on the printed version of the invoice or bill, and used as search strings in the find functions. The id is arbitrary text and (especially with bills) there is no guarantee they aren't duplicates. Many records have both an id and a guid: customers, vendors, invoices being examples. ![]() But since most of the deeply-nested KVPs are online banking setup and import Bayesian matching data, neither of which is of much use outside of Gnucash, you can probably get away with a simple second inner join on slots2.obj_guid = slots1.guid_val.ĬREATE TABLE schedxactions ( guid CHAR ( 32 ) PRIMARY KEY NOT NULL, name text ( 2048 ), enabled integer NOT NULL, start_date date NOT NULL, end_date date, last_occur date, num_occur integer NOT NULL, rem_occur integer NOT NULL, auto_create integer NOT NULL, auto_notify integer NOT NULL, adv_creation integer NOT NULL, adv_notify integer NOT NULL, instance_count integer NOT NULL, template_act_guid CHAR ( 32 ) NOT NULL ) A KVP can be one of several types, so only one of the foo_val fields will be non-null.įor anyone looking to query a Gnucash db without using the Gnucash API, that means that in order to get all of ths KVP information you'll have to examine the slot type and requery for the children of any FRAME or LIST slots. These guid's are discarded at load, and an outside entity's slots are recursively deleted and rewritten when it is edited. (Yes, id's would be much faster but would require a schema change). Container slots (which may be of type KVP_TYPE_FRAME or KVP_TYPE_GLIST) will have a giud_val, and child slots will use this value for their obj_guid. A top-level slot will have a have as it's obj_guid the guid of some row in another table. ![]() Slots is a sort of catch all for a variety of data lacking a table. CREATE TABLE accounts ( guid CHAR ( 32 ) PRIMARY KEY NOT NULL, name text ( 2048 ) NOT NULL, account_type text ( 2048 ) NOT NULL, commodity_guid CHAR ( 32 ) NOT NULL, commodity_scu integer NOT NULL, non_std_scu integer NOT NULL, parent_guid CHAR ( 32 ), code text ( 2048 ), description text ( 2048 ), hidden integer NOT NULL, placeholder integer NOT NULL ) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |