Class AdoSchemaDiscovery
- Namespace
- IntentSharp.Data
- Assembly
- IntentSharp.dll
Discovery that works across common ADO.NET providers: SQLite through sqlite_master and
PRAGMA table_info; SQL Server, PostgreSQL and MySQL through INFORMATION_SCHEMA; anything else
through GetSchema(string). The connection string is never copied into the result.
public sealed class AdoSchemaDiscovery : ISchemaDiscovery
- Inheritance
-
objectAdoSchemaDiscovery
- Implements
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- AdoSchemaDiscovery()
Creates a discovery. It holds no state, so one instance can serve every connection.
Methods
- DetectDialect(DbConnection)
The dialect named by the connection's type: the first of
Sqlite,MySql,SqlClient,NpgsqlandOraclethat the full type name contains, else "SQL".MySqlis tested beforeSqlClientbecause the MySql.Data connection isMySql.Data.MySqlClient.MySqlConnection.
- DiscoverAsync(DbConnection, CancellationToken)
Reads the tables, views and columns that
connectioncan see. A closed connection is opened for the discovery and closed again; an open one is left open.