get rid of unnecessary dbms-specific disconnect methods
git-svn-id: file:///home/svn/framework3/trunk@9311 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
a17dd47908
commit
eb29533ee1
|
@ -1202,11 +1202,8 @@ class Db
|
|||
return
|
||||
end
|
||||
|
||||
meth = "db_disconnect_#{framework.db.driver}"
|
||||
if(self.respond_to?(meth))
|
||||
self.send(meth, *args)
|
||||
else
|
||||
print_error("This database driver #{framework.db.driver} is not currently supported")
|
||||
if (framework.db)
|
||||
framework.db.disconnect()
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1230,15 +1227,6 @@ class Db
|
|||
# Database management: SQLite3
|
||||
#
|
||||
|
||||
#
|
||||
# Disconnect from the current SQLite3 instance
|
||||
#
|
||||
def db_disconnect_sqlite3(*args)
|
||||
if (framework.db)
|
||||
framework.db.disconnect()
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Connect to an existing SQLite database
|
||||
#
|
||||
|
@ -1322,15 +1310,6 @@ class Db
|
|||
# Database management: MySQL
|
||||
#
|
||||
|
||||
#
|
||||
# Disconnect from the current MySQL instance
|
||||
#
|
||||
def db_disconnect_mysql(*args)
|
||||
if (framework.db)
|
||||
framework.db.disconnect()
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Connect to an existing MySQL database
|
||||
#
|
||||
|
@ -1485,17 +1464,10 @@ class Db
|
|||
res
|
||||
end
|
||||
|
||||
|
||||
#
|
||||
# Database management: Postgres
|
||||
#
|
||||
#
|
||||
# Disconnect from the current Postgres instance
|
||||
#
|
||||
def db_disconnect_postgresql(*args)
|
||||
if (framework.db)
|
||||
framework.db.disconnect()
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
# Connect to an existing Postgres database
|
||||
|
|
Loading…
Reference in New Issue