transaction_isolation:以与数据库无关的方式在ActiveRecord中设置事务隔离级别

时间:2021-05-16 11:59:38
【文件属性】:
文件名称:transaction_isolation:以与数据库无关的方式在ActiveRecord中设置事务隔离级别
文件大小:20KB
文件格式:ZIP
更新时间:2021-05-16 11:59:38
Ruby 不再维护-请分叉或寻求其他解决方案 transaction_isolation 以与数据库无关的方式在ActiveRecord中设置事务隔离级别。 只要您使用的是新适配器mysql2,pg或sqlite3,就可以与MySQL,PostgreSQL和SQLite一起使用。 支持所有ANSI SQL隔离级别::serializable,:repeatable_read,:read_committed,:read_uncommitted。 另请参阅 gem,以获取有关死锁和序列化错误的自动重试事务。 例子 ActiveRecord::Base.isolation_level( :serializable ) do # your code end 安装 将此添加到您的Gemfile中: gem 'transaction_isolation' 然后运行: bundle 它可以与Ru
【文件预览】:
transaction_isolation-master
----lib()
--------transaction_isolation()
--------transaction_isolation.rb(1KB)
----Gemfile(410B)
----transaction_isolation.gemspec(1KB)
----d(38B)
----Rakefile(203B)
----LICENSE(1KB)
----test()
--------test_helper.rb(280B)
--------integration()
--------log()
--------db()
--------library_setup.rb(738B)
--------test_console.rb(394B)
--------test_runner.rb(108B)
----README.md(4KB)
----tests(89B)
----.gitignore(54B)

网友评论