TOPIC: Table definitions
Table definitions 4 Years, 3 Months ago

Another suggestion - Should we have Table definitions similar to Field definitions. Say we can specify something like -

Keys: #('mycol_1')
Columns: "mycol_2, mycol_3"
Indices: (#('mycol_4' master: false cascade: false update:false) #('my_col4'))

When ever mytable is accessed (for example while executing the code Query1(mytable where..')), suneido should automatically check for a definiton for the table (a record in one of the Used Libraries which starts, say with "Table_"). If such a definition is found the table is made / updated as the case may be as per the definition provided. Not sure whether the definition should be called always automatically when the table is referred to. But, if support for such table defenitions would help while developing programmes - To remove a column which previously I thought was essential I need not open Schema View to see if it is there and then issue a command to remove it; To modify a index i made earlier to be linked to a mastertable, I need not delete the index and then execute a second command to make it once more... For all the work, all i have to do is to check if the table definiton is there and is as per my requirement.

Re:Table definitions 4 Years, 3 Months ago
What we have done in our applications is used plugins to create the neccessary schema. The plugins contain a series of ensure specifications that define the table's columns, keys and indexes. You can see an example of this in the Accounting download on the downloads page. It seems to work well except you can not remove items from the schema.
Jeff Ferguson
Suneido Software