/// <summary> /// Initializes a new instance of the <see cref="SqliteDatabaseViewProvider"/> class. /// </summary> /// <param name="connection">A database connection.</param> /// <param name="pragma">A connection pragma for the SQLite connection.</param> /// <param name="identifierDefaults">Identifier defaults for the associated database.</param> /// <exception cref="ArgumentNullException"><paramref name="connection"/> or <paramref name="pragma"/> or <paramref name="identifierDefaults"/> are <c>null</c>.</exception> public SqliteDatabaseViewProvider(ISchematicConnection connection, ISqliteConnectionPragma pragma, IIdentifierDefaults identifierDefaults) { Connection = connection ?? throw new ArgumentNullException(nameof(connection)); ConnectionPragma = pragma ?? throw new ArgumentNullException(nameof(pragma)); IdentifierDefaults = identifierDefaults ?? throw new ArgumentNullException(nameof(identifierDefaults)); }
/// <summary> /// Constructs a new <see cref="SqliteRelationalDatabase"/>. /// </summary> /// <param name="connection">The connection to a SQLite database.</param> /// <param name="identifierDefaults">Default values for identifier components.</param> /// <param name="connectionPragma">Default values for identifier components.</param> /// <exception cref="ArgumentNullException">Thrown when <paramref name="connection"/>, or <paramref name="identifierDefaults"/>, or <paramref name="connectionPragma"/> are <code>null</code>.</exception> public SqliteRelationalDatabase(ISchematicConnection connection, IIdentifierDefaults identifierDefaults, ISqliteConnectionPragma connectionPragma) { Connection = connection ?? throw new ArgumentNullException(nameof(connection)); IdentifierDefaults = identifierDefaults ?? throw new ArgumentNullException(nameof(identifierDefaults)); _tableProvider = new SqliteRelationalDatabaseTableProvider(connection, connectionPragma, identifierDefaults); _viewProvider = new SqliteDatabaseViewProvider(connection, connectionPragma, identifierDefaults); }