Having already learned a lot after chess and my lemming-game (soon on github) I would like to create a third project which I already programmed in c# and I am actually using for my job: like database conversions, documentation generator, sql-scripting, etc.
It is for ms sql-server only, so planning to use Tiberius for this project.
There are two main area's in here. I only will ask about #1 for now.
I get the metadata from a database and make a structure of that like here:
Metadata
all_tables (list)
all_fields (list)
all_foreignkeys (list)
all_indexes (list)
all_constraints (list)
Table
owner_metadata
fields
indexes
// more
Field
owner_table
data_type
max_length
primarykey
used_in_indexes
Index
owner_table
fields
// etc...
We can imagine how that happens in c#. lots of owner / parent hierarchies and object references all over the place. The Metadata object holds a flat list of all entities like tables, fields. etc.
So question 1 is: what would be a nice Rusty way to accomplish this without the object reference spaghetti?