Class Rubernate::Runtime
In: rubernate/runtime.rb
Parent: Object

Base class for all Runtime implementations.

Methods

Included Modules

Callbacks::Runtime

Constants

Log = Rubernate::Log   Log for Runtime events

Attributes

settings  [R]  Runtime scope settings

Public Class methods

Public Instance methods

Attaches object to session. Causes error if object with equal primary key already loaded in session.

Begins session and transaction.

Persist all changes and commit transction.

Finds object by primary key. Raises ObjectNotFoundException if object is not found

Finds objects by query. Returns ordered list of objects or empty one if no objects was found. The query can be one of two types.

  • native sql - in this case params should be of type Array.
  • query language - params shoud be of type Hash.

Stores modified objects to database. This method is invoked before transaction commit and before each invokation of Runtime.find_by_query. You can invoke this method manually if you want to store all changes of your objects to database immediately.

Removes object

Discard all changes and rollback transaction.

[Validate]