Data sync record column macros #45
Labels
No labels
bug
confirmed
critical
discussion
documentation
Doing
enhancement
suggestion
support
To Do
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: hazaar/hazaar-dbi#45
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There are cases where we may want to put data from another table into a column when syncing a record. An example would be looking up the id of another record to use in the record being synced. Previously this would mean that all these primary and foreign keys would have to be defined manually. With issue #44 on the way, we will be able to add records based on non-primary keys and therefore we will need a way of looking up these values to use as foreign key data.
I'm not exactly sure how to define these macros as we don't want to interfer with any possible data being inserted/updated.
I have decided to go with the following format for the macros:
Where:
source_table
is the table to lookup data from.source_column
is the name of the column to use for data.criteria
is a basic selection criteria such ascolumn1=value1,column2=value2
.For example, to take the
id
column from therequest_type
table from a row wherename
is set toregistration
.This would allow a previous data sync row to add the
registration
request type and then we can use it's primary key columnid
as the value for this column.created merge request !19 to address this issue
mentioned in merge request !19
closed via merge request !19
mentioned in commit
00bf03f18d
mentioned in issue #47