Class RBase::Record
In: lib/rbase/record.rb
Parent: Object

Class that contains data for particular table row. Should not be created explicitly (use Table#create to create records)

Accessing attributes

You can read and assign values to row‘s columns using simple property syntax:

  user = users_table[0]
  user.name = 'Bob'
  user.birth_date = Date.new(1980, 2, 29)
  user.save

  puts user.name
  puts user.birth_date

Methods

Attributes

index  [R] 
table  [R] 

Public Class methods

Public Instance methods

Clone record.

Delete record from database.

Returns true if record was marked as deleted; otherwise return false.

Returns true if record was never saved to database; otherwise return false.

Save record to database.

Protected Instance methods

Returns value of specified column

Sets value of specified column.

[Validate]