Hello Guys :)

 

I'm new and still testing jOOQ how I can use it in the best way.


*1)* Is it intended that a CRUD insert also creates a select statement 
after the insert? (*MariaDB.log* - red marked line) I personally would say 
it's overhead especially because the update statement don't do that, but 
what do say the professionals?

*2)* Is there any way to eliminate the "set autocommit" line? I want to 
disable auto commit at all but don't found any option.  (*MariaDB.log* - 
orange marked line)

session.transaction(configuration -> {
    DSLContext tx = DSL.using(configuration);
                
    AuthorRecord author = tx.newRecord(AUTHOR);
                
                
    //author = tx.newRecord(AUTHOR);
    author.setId(13);
    author.setFirstName("Bard");
    author.setLastName("Simpson");
    author.insert();
      
    author.setId(11);
    author.setFirstName("Homer");
    author.setLastName("Simpson");
    author.update();
});


*MariaDB.log*
181004 13:12:22    876 Query set autocommit=0
   876 Query SET STATEMENT max_statement_time=60 FOR INSERT INTO 
library.author (id, first_name, last_name) VALUES (13, 'Bard', 'Simpson')
   876 Query SET STATEMENT max_statement_time=60 FOR SELECT 
library.author.id FROM library.author WHERE library.author.id = 13
   876 Query SET STATEMENT max_statement_time=60 FOR UPDATE library.author 
SET library.author.id = 11, library.author.first_name = 'Homer', 
library.author.last_name = 'Simpson', library.author.date_of_birth = NULL, 
library.author.year_of_birth = NULL, library.author.distinguished = NULL 
WHERE library.author.id = 11
   876 Query COMMIT
   876 Query set autocommit=1



-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to