This is an outline for how I'm going to progress for a basic table
discovery system.
There will be 3 things added to use implementations in each
StorageEngine:
int get_table_metadata(db, table_name, *table_proto);
if a pointer to a table proto is provided, it is filled
out with the metadata for the table. Or an error is
returned (e.g. ENOENT)
if no proto is provided, function returns if getting
the metadata would have been successful (i.e. the table
exists) or some other error.
It iterates over an implementation in each StorageEngine
and returns the first successful result. If table exists
in more than one engine you only get the first.
Table name iterator
An iterator over all table names in a database.
Table proto iterator
An iterator over all the table protos for tables in a database.
The above two iterators iterate over the iterators implemented by each
engine.
For each of the above, after progressing through all the engines, a
default implementation is tried: that of looking at on-disk '.dfe' files
that hold the table proto.
--
Stewart Smith
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp