Home

Maurice

Hi,

Welcome to the SQLite Metadata Reader project

Q: What is the SQLite Metadata Reader project about?
A: In short, it is a wrapper around the data returned by the SQLiteConnection.GetSchema(*) methods.

Q: Wrapper?
A: Various data is returned by GetSchema(*) function depending on the parameter passed. However, the data that is returned, is always returned as a DataRow which can be a bit cumbersome to work with at times. Now, what the SQLite Metadata Reader does is, instead of giving back a DataRow object to the developer, a strongly typed class is returned.

Q: What metadata collections can be queried?
A: According to the SQLiteMetaDataCollectionNames class the following can be queried. The common ones are

  • Catalogs
  • Columns
  • Indexes
  • IndexColumns
  • Tables
  • Views
  • ViewColumns
  • ForeignKeys
  • Triggers
    More can be queried, but these are the most important and common collections.

Q: Does the SQLite Metadata Reader project return the above collections?
A: Yes. Some code samples has been provided. I've tried to keep the API as simple as possible but bare in mind as its still early alpha days, that the API could change a bit for the better.

Q: Where do I start?
A: Well the quickest way to get going is to:
Create a SQLiteConnection and assign it a data source.
Open the connection.
* Create a CatalogCollection type and pass it the SQLiteConnection object.

Q: What happens then?
A: When the CatalogCollection type is instantiated, all the schema and metadata information of the attached database(s) is returned.

Q: What you mean attached database(s)?
A: Sqlite can have multiple databases attached to one connection. Instantiating the CatalogCollection object will retrieve information on ALL database catalogs attached to the SQLiteConnection.

Q: Show me some code examples please!
A: Check the downloads section or the code in the svn repository. More examples will follow soon.

Project Admins: