目次

AlPersist データ永続化モジュール

概要

想定する用途

注意点

簡単な使い方

AlPersistSQLite(SQLite版)の例です。

require "al_persist_sqlite"
DSN = "/tmp/testdb.sqlite"
 
@db = AlPersistSqlite.connect( DSN )
@persist = @db.table( "table1", :id )
 
@persist.create( {:id=>1, :name=>"TARO", :age=>20} )
@persist.read( :id=>1 ) 
p @persist.values   # {:id=>1, :name=>"TARO", :age=>20}
 
@persist.update( {:id=>1, :age=>21} )
 
@persist.delete( {:id=>1 } )

機能詳細

クラスツリー