Parent

Files

Class Index [+]

Quicksearch

ActiveRecord::ConnectionAdapters::SQLiteAdapter::StatementPool

Public Class Methods

new(connection, max) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 39
39:         def initialize(connection, max)
40:           super
41:           @cache = Hash.new { |h,pid| h[pid] = {} }
42:         end

Public Instance Methods

[](key) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 46
46:         def [](key);      cache[key]; end
[]=(sql, key) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 49
49:         def []=(sql, key)
50:           while @max <= cache.size
51:             dealloc(cache.shift.last[:stmt])
52:           end
53:           cache[sql] = key
54:         end
clear() click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 56
56:         def clear
57:           cache.values.each do |hash|
58:             dealloc hash[:stmt]
59:           end
60:           cache.clear
61:         end
each(&block) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 44
44:         def each(&block); cache.each(&block); end
key?(key) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 45
45:         def key?(key);    cache.key?(key); end
length() click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 47
47:         def length;       cache.length; end

Private Instance Methods

cache() click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 64
64:         def cache
65:           @cache[$$]
66:         end
dealloc(stmt) click to toggle source
    # File lib/active_record/connection_adapters/sqlite_adapter.rb, line 68
68:         def dealloc(stmt)
69:           stmt.close unless stmt.closed?
70:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.