From a4fa6eab396e703eb70b70ed708220a6405f2899 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 6 Sep 2011 16:06:27 -0700 Subject: adding a statement pool for mysql and sqlite3 --- .../connection_adapters/statement_pool.rb | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 activerecord/lib/active_record/connection_adapters/statement_pool.rb (limited to 'activerecord/lib/active_record/connection_adapters/statement_pool.rb') 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 -- cgit v1.2.3