code: public static Atomic atomic(Runnable runnable) {
          try {
              AnimaQuery.beginTransaction();
              runnable.run();
              AnimaQuery.commit();
              return Atomic.ok();
          } catch (Exception e) {
  
              boolean isRollback = ifReturn(
                      of().rollbackException.isInstance(e),
                      () -> {
                          AnimaQuery.rollback();
                          return true;
                      },
                      () -> false);
  
              return Atomic.error(e).rollback(isRollback);
          } finally {
              AnimaQuery.endTransaction();
          }
      }
docs: Code that performs a transaction operation.
  
  @param runnable the code snippet to execute.
  @return Atomic