コード例 #1
0
        public void Close_WhenConnectionStringNotProvided_ClosesInMemoryDatabase()
        {
            var dbConnection = new DuckDbConnection();

            dbConnection.Open();
            dbConnection.Close();
        }
コード例 #2
0
        public void Close_WhenOtherInMemoryConnectionOpened_ClosesInMemoryDatabase()
        {
            var dbConnection1 = new DuckDbConnection();
            var dbConnection2 = new DuckDbConnection();

            dbConnection1.Open();
            dbConnection2.Open();
            dbConnection1.Close();
            dbConnection2.Close();
        }
コード例 #3
0
ファイル: CommandTests.cs プロジェクト: x2bool/duckdb-net
        public void ExecuteScalar_Always_ExecutesCommand()
        {
            var dbConnection = new DuckDbConnection();

            dbConnection.Open();

            try
            {
                using var command = new DuckDbCommand("SELECT 1;", dbConnection);
                command.ExecuteScalar();
            }
            finally
            {
                dbConnection.Close();
            }
        }