Created
August 11, 2011 06:46
-
-
Save jeppenejsum/1139035 to your computer and use it in GitHub Desktop.
Rails FK hack in JRuby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ::ArJdbc | |
module PostgreSQL | |
module Column | |
print "In module" | |
def disable_referential_integrity(&block) | |
print "disable jdbc" | |
transaction { | |
begin | |
execute "SET CONSTRAINTS ALL DEFERRED" | |
yield | |
ensure | |
execute "SET CONSTRAINTS ALL IMMEDIATE" | |
end | |
} | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment