change var names to better reflect their purpose

Change-Id: I898613c44cd273c01fe75390812308c231410327
extract function to save rows to the alternate DB from a loading template

Change-Id: I958222e5c8a1e68a439f3a8dff6028e9a04da21e
Move table creation up one scope - now the insert-creator doesn't need to know about $ds_type

Change-Id: I123adfd01cb882fd720f3cb8ffe322d4e65ff8a5
Support passing the username and password in the alternate DB connect string

Change-Id: I71e5a2f5d9807dd7d390bbc9a3e526c6816507b7
Handle data with foreign key dependancies

If a table has foreign keys, figure out the ID of the thing in the remote
class' table based on the current row's data, then do an insert of the FK
prerequsite data by doing a get() in that class' ID.

Renamed method to use a plural name since it's now returning more than one
subref - one for each prerequsite and one for the current row.

Change-Id: I302c3df9ffdd6940eb69549f74d9512ba4782035
ensure we always have an up-to-date picture of the schema

If the metaDB is out of date or incomplete, we can't do the inserts

Change-Id: Iadf6cf8310fa9bdb1722ead5ee0cc16e055eea3b
more effective way of determining column order - based on column names instead of property names

Change-Id: I19e4ff9bbc6e2cdc0f39d10bb568b85fe5c708d9
extract method to turn one FK into a prerequsite loading closure

Change-Id: I215aed3b26972dd40bf4b6d3ed79de64b7eb5614
whitespace

Change-Id: If6229af08b73db5b089002a3472fabf88bc95324
Method to return a data source appropriate type given a UR data type

Change-Id: I3d6cc50c9b5c0a5bb3f0a40d5571fff2e553ac58
use the appropriate data type for the column when constructing the SQL table

Change-Id: I710bcc2e4995adad4eb46946c3fca4b471ec4c72
Filling alternate DB now controlled with property on the datasource

This way filling can be controlled on a per-datasource basis, rather than
all or nothing.

Change-Id: I173e6a991281983dbe98f9ce6c0e8d153ae3c044
Use raw DB info for foreign keys instead of MetaDB info

If the MetaDB is out of date, refreshing the MetaDB objects based on the
source database can cause unwanted changes to the MetaDB on disk when
the Context is committed.

Change-Id: I20ac466182927235d8888721173d70772894b433
avoid uninitialized value warnings

This case can happen with optional delegated values that cause a left
join and NULLs in those columns.

Change-Id: If734c3473d08daf682e18ab2dcfe7320e8de1cc8
Alternate DB loading works properly with classes having multiple ID properties/columns

Change-Id: I05849c3bca400b47424e8d143709413150c1b838
spelling

Change-Id: I4482e0049d5329fdec9e92bd0fef588419186e11
Normalize schema/table/column names in foreign key data

Change-Id: I69c159fc6a39097c2d68abbd7b9af14513e8092b
Handle the case when a table's FK points back to the same table

Change-Id: I44780ab0f10b73df626daddbbd09c4dbbe2aa154
extract method to get the foreign key data for a class's table

Change-Id: I01249cd4cbd35f4fa9c7420019a4f760eb60db61
Handle the case where a class' PKs point to another table's PKs, but not because of inheritance

Change-Id: Ia8ef58d7fb651766ba7b923af27c2a203edee1e9