/// <summary>
 /// 指定されたパラメタでインスタンスを生成します。
 /// </summary>
 /// <param name="connectionSubstance">接続実体オブジェクト</param>
 internal TransactionSubstance(ConnectionSubstance connectionSubstance)
 {
     this.count = 0;
     this.isRollback = false;
     this.connectionSubstance = connectionSubstance;
     this.transaction = this.connectionSubstance.FbConnection.BeginTransaction(Transaction.FbTransactionOption);
     this.commandList = new List<Command>();
     this.disposed = false;
 }
예제 #2
0
        /// <summary>
        /// 指定されたパラメタでインスタンスを生成します。
        /// </summary>
        /// <param name="connectionSubstance">接続実体オブジェクト</param>
        internal Transaction(ConnectionSubstance connectionSubstance)
        {
            this.isOver = false;
            this.connectionSubstance = connectionSubstance;
            this.transactionSubstance = connectionSubstance.TransactionSubstance;
            this.disposed = false;

            this.transactionSubstance.BeginTransaction();
        }
예제 #3
0
 /// <summary>
 /// 指定されたパラメタでインスタンスを生成します。
 /// </summary>
 /// <param name="commandText">SQL文</param>
 /// <param name="connectionSubstance">コネクションオブジェクト</param>
 /// <param name="transactionSubstance">トランザクションオブジェクト</param>
 internal Command(string commandText, ConnectionSubstance connectionSubstance, TransactionSubstance transactionSubstance)
 {
     this.fbCommand = new FbCommand(commandText, connectionSubstance.FbConnection, transactionSubstance.FbTransaction);
     this.parameters = new Dictionary<string, object>();
     this.disposed = false;
 }
예제 #4
0
 /// <summary>
 /// 指定された接続文字列でインスタンスを生成します。
 /// </summary>
 /// <param name="connectionString">接続文字列</param>
 public Connection(string connectionString)
 {
     this.isOpened = false;
     this.isClosed = false;
     this.connectionString = connectionString;
     this.connectionSubstance = this.GetConnectionSubstance();
     this.disposed = false;
 }
예제 #5
0
        /// <summary>
        /// 接続文字列に対応した、接続実体オブジェクトを取得します。
        /// </summary>
        /// <returns>接続実体オブジェクト</returns>
        private ConnectionSubstance GetConnectionSubstance()
        {
            // 同じ接続文字列の接続実体オブジェクトがあれば、それを使用する
            if (false == Connection.dictConnectionSubstance.ContainsKey(this.connectionString))
            {
                // 新しい接続実体オブジェクトを作成し、一覧に追加
                ConnectionSubstance connection = new ConnectionSubstance(this.connectionString);
                Connection.dictConnectionSubstance.Add(connectionString, connection);
            }

            return Connection.dictConnectionSubstance[this.connectionString];
        }