Esempio n. 1
0
        /// <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;
        }
Esempio n. 2
0
        /// <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;
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AceQLCommand"/> class with the text of the query and a
 /// <see cref="AceQLConnection"/>, and the <see cref="AceQLTransaction"/>.
 /// </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>
 /// <param name="transaction">A <see cref="AceQLTransaction"/>.</param>
 /// <exception cref="System.ArgumentNullException">
 /// If cmdText is null or connection or transaction is null.
 /// </exception>
 public AceQLCommand(string cmdText, AceQLConnection connection, AceQLTransaction transaction) : this(cmdText, connection)
 {
     this.transaction = transaction ?? throw new ArgumentNullException("transaction is null!");
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AceQLTransaction"/> class.
 /// </summary>
 /// <param name="connection">The AceQL connection.</param>
 /// <param name="isolationLevel">The isolation level.</param>
 internal AceQLTransaction(AceQLConnection connection, IsolationLevel isolationLevel) : this(connection)
 {
     this.isolationLevel = isolationLevel;
 }
Esempio n. 5
0
 /// <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;
 }