public void Close_WhenConnectionStringNotProvided_ClosesInMemoryDatabase()
        {
            var dbConnection = new DuckDbConnection();

            dbConnection.Open();
            dbConnection.Close();
        }
        public void Close_WhenOtherInMemoryConnectionOpened_ClosesInMemoryDatabase()
        {
            var dbConnection1 = new DuckDbConnection();
            var dbConnection2 = new DuckDbConnection();

            dbConnection1.Open();
            dbConnection2.Open();
            dbConnection1.Close();
            dbConnection2.Close();
        }
Beispiel #3
0
        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();
            }
        }