Sha256: a7e4107ee86d83b9a8518ba1f6845da2f2fbea319dadf2a12d3a00082d238b6a
Contents?: true
Size: 473 Bytes
Versions: 9
Compression:
Stored size: 473 Bytes
Contents
# frozen_string_literal: true require "mini_sql/abstract/prepared_cache" module MiniSql module Postgres class PreparedCache < ::MiniSql::Abstract::PreparedCache private def alloc(sql) alloc_key = next_key @connection.prepare(alloc_key, sql) alloc_key end def dealloc(key) @connection.query "DEALLOCATE #{key}" if @connection.status == PG::CONNECTION_OK rescue PG::Error end end end end
Version data entries
9 entries across 9 versions & 1 rubygems