aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/statement_pool.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-09-06 16:06:27 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-09-06 16:06:27 -0700
commita4fa6eab396e703eb70b70ed708220a6405f2899 (patch)
treeac11c7ef42fdb85860a61acc046cc937d92e03cc /activerecord/lib/active_record/connection_adapters/statement_pool.rb
parent51652a4773ab19c866ea1781b39f46f17faa68f3 (diff)
downloadrails-a4fa6eab396e703eb70b70ed708220a6405f2899.tar.gz
rails-a4fa6eab396e703eb70b70ed708220a6405f2899.tar.bz2
rails-a4fa6eab396e703eb70b70ed708220a6405f2899.zip
adding a statement pool for mysql and sqlite3
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/statement_pool.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/statement_pool.rb40
1 files changed, 40 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/statement_pool.rb b/activerecord/lib/active_record/connection_adapters/statement_pool.rb
new file mode 100644
index 0000000000..c6b1bc8b5b
--- /dev/null
+++ b/activerecord/lib/active_record/connection_adapters/statement_pool.rb
@@ -0,0 +1,40 @@
+module ActiveRecord
+ module ConnectionAdapters
+ class StatementPool
+ include Enumerable
+
+ def initialize(connection, max = 1000)
+ @connection = connection
+ @max = max
+ end
+
+ def each
+ raise NotImplementedError
+ end
+
+ def key?(key)
+ raise NotImplementedError
+ end
+
+ def [](key)
+ raise NotImplementedError
+ end
+
+ def length
+ raise NotImplementedError
+ end
+
+ def []=(sql, key)
+ raise NotImplementedError
+ end
+
+ def clear
+ raise NotImplementedError
+ end
+
+ def delete(key)
+ raise NotImplementedError
+ end
+ end
+ end
+end