lib/smart_session/mysql2.rb
def find(conditions)
        connection = session_connection
        # connection.query_with_result = true
        result = query("SELECT session_id, data,id #{  SmartSession::SqlSession.locking_enabled? ? ',lock_version ' : ''} FROM #{SmartSession::SqlSession.table_name} WHERE " + conditions)
         my_session = nil
        # each is used below, as other methods barf on my 64bit linux machine
        # I suspect this to be a bug in mysql-ruby
        result.each do |row|
          my_session = new(row[0], row[1])
          my_session.id = row[2]
          my_session.lock_version = row[3].to_i
        end
        # result.free
        my_session
      end
# retrieve the session table connection and get the 'raw' Mysql connection from it
retrieve the session table connection and get the 'raw' Mysql connection from it
retrieve the session table connection and get the ' raw ' Mysql connection from it
def find(conditions)
        connection = session_connection
        result = query("SELECT session_id, data,id #{  SmartSession::SqlSession.locking_enabled? ? ',lock_version ' : ''} FROM #{SmartSession::SqlSession.table_name} WHERE " + conditions)
         my_session = nil
        result.each do |row|
          my_session = new(row[0], row[1])
          my_session.id = row[2]
          my_session.lock_version = row[3].to_i
        end
        my_session
      end
def find ( conditions ) connection = session_connection result = query ( "SELECT session_id, data,id #{  SmartSession::SqlSession.locking_enabled? ? ',lock_version ' : ''} FROM #{SmartSession::SqlSession.table_name} WHERE " + conditions ) my_session = nil result . each do | row | my_session = new ( row [ 0 ] , row [ 1 ] ) my_session . id = row [ 2 ] my_session . lock_version = row [ 3 ] . to_i end my_session end
retrieve the session table connection and get the 'raw' Mysql connection from it
retrieve the session table connection and get the ' raw ' Mysql connection from it
# connection.query_with_result = true # each is used below, as other methods barf on my 64bit linux machine # I suspect this to be a bug in mysql-ruby # result.free
conditions