Closed tendant closed 13 years ago
Database transaction does work as expected in clojureql. But for mysql, only InnoDB storage engine supports transaction.
Update above table creation statement for mysql as follow. Now it works well.
create table users ( id int auto_increment, name varchar(20), city varchar(20) not null, primary key (id)) engine=InnoDB;
Support database transaction in cql or make cql work with clojure.contrib.sql/transaction.
For example:
Current behavior:
First conj! will insert a record into database, second conj! will throw an exception.
Designed behavior:
Rollback all db operation wrapped in clojure.contrib.sql/transaction. None of records can be inserted into database table.