/// <summary> /// Constructor /// </summary> /// <param name="aceQLConnection">the Connection to the remote database.</param> /// <exception cref="ArgumentNullException">aceQLConnection is null!</exception> internal RemoteDatabaseMetaData(AceQLConnection aceQLConnection) { if (aceQLConnection == null) { throw new ArgumentNullException("aceQLConnection is null!"); } this.aceQLHttpApi = aceQLConnection.GetAceQLHttpApi(); }
/// <summary> /// Initializes a new instance of the <see cref="AceQLConnection"/> class when given a string that contains the connection string. /// </summary> /// <param name="connectionString">The connection used to open the remote database.</param> /// <exception cref="System.ArgumentNullException">If connectionString is null.</exception> public AceQLConnection(String connectionString) { if (connectionString == null) { throw new ArgumentNullException("connectionString is null!"); } aceQLHttpApi = new AceQLHttpApi(connectionString); }
/// <summary> /// Initializes a new instance of the <see cref="AceQLDataReader"/> class. /// </summary> /// <param name="file">The JSON file containing the Result Set. Passed only for delete action.</param> /// <param name="readStream">The reading stream on file.</param> /// <param name="rowsCount">The number of rows in the file/result set.</param> /// <param name="connection">The AceQL connection.</param> /// <exception cref="System.ArgumentNullException">The file is null.</exception> internal AceQLDataReader(IFile file, Stream readStream, int rowsCount, AceQLConnection connection) { this.file = file ?? throw new ArgumentNullException("file is null!"); this.rowsCount = rowsCount; this.aceQLHttpApi = connection.aceQLHttpApi; rowParser = new RowParser(readStream); this.rowsCount = rowsCount; }
/// <summary> /// Initializes a new instance of the <see cref="AceQLCommand"/> class with the text of the query /// and a <see cref="AceQLConnection"/>. /// </summary> /// <param name="cmdText">The text of the query.</param> /// <param name="connection">A <see cref="AceQLConnection"/> that represents the connection to a remote database.</param> /// <exception cref="System.ArgumentNullException"> /// If cmdText is null /// or /// connection is null. /// </exception> public AceQLCommand(string cmdText, AceQLConnection connection) : this(cmdText) { if (connection == null) { throw new ArgumentNullException("connection is null!"); } connection.TestConnectionOpened(); this.connection = connection; this.aceQLHttpApi = connection.aceQLHttpApi; this.simpleTracer = aceQLHttpApi.simpleTracer; }
/// <summary> /// Initializes a new instance of the <see cref="AceQLConnection"/> class when given a string that contains the connection string /// and an <see cref="AceQLCredential"/> object that contains the username and password. /// </summary> /// <param name="connectionString">A connection string that does not use any of the following connection string keywords: Username /// or Password.</param> /// <param name="credential"><see cref="AceQLCredential"/> object. </param> /// <exception cref="System.ArgumentNullException">If connectionString is null or <see cref="AceQLCredential"/> is null.</exception> /// <exception cref="System.ArgumentException">connectionString token does not contain a = separator: " + line</exception> public AceQLConnection(string connectionString, AceQLCredential credential) { if (connectionString == null) { throw new ArgumentNullException("connectionString is null!"); } if (credential == null) { throw new ArgumentNullException("credential is null!"); } aceQLHttpApi = new AceQLHttpApi(connectionString, credential); }
/// <summary> /// Initializes a new instance of the <see cref="AceQLConnection"/> class. /// </summary> public AceQLConnection() { aceQLHttpApi = new AceQLHttpApi(); }
/// <summary> /// Initializes a new instance of the <see cref="AceQLTransaction"/> class. /// </summary> /// <param name="connection">The AceQL connection.</param> internal AceQLTransaction(AceQLConnection connection) { this.aceQLHttpApi = connection.aceQLHttpApi; this.connection = connection; }