Module: Og
- Defined in:
- lib/og.rb,
lib/og/store.rb,
lib/og/types.rb,
lib/og/entity.rb,
lib/og/errors.rb,
lib/og/manager.rb,
lib/og/relation.rb,
lib/og/store/sql.rb,
lib/og/collection.rb,
lib/og/mixin/tree.rb,
lib/og/store/psql.rb,
lib/og/store/kirby.rb,
lib/og/store/memory.rb,
lib/og/store/filesys.rb,
lib/og/mixin/orderable.rb,
lib/og/store/madeleine.rb,
lib/og/store/sqlserver.rb,
lib/og/relation/has_one.rb,
lib/og/mixin/timestamped.rb,
lib/og/relation/has_many.rb,
lib/og/mixin/hierarchical.rb,
lib/og/relation/refers_to.rb,
lib/og/relation/belongs_to.rb,
lib/og/relation/joins_many.rb,
lib/og/relation/many_to_many.rb,
lib/og/store/sqlite.rb,
lib/og/store/mysql.rb
Overview
class Sqlserver::Result def blank? 0 == num_rows end
alias_method :next, :fetch_row
def each_row each do |row| yield(row, 0) end end def first_value val = fetch_row free return val end alias_method :close, :free end
Defined Under Namespace
Modules: EntityMixin, Hierarchical, MemoryUtils, MysqlUtils, NestedSets, Orderable, PsqlUtils, RelationMacros, SqlUtils, SqlserverUtils, Timestamped, TreeTraversal, Unmanageable Classes: BelongsTo, Collection, Entity, FilesysStore, HasMany, HasManyCollection, HasOne, JoinsMany, JoinsManyCollection, KirbyStore, Manager, ManyToMany, MemoryStore, MysqlStore, PsqlStore, RefersTo, Relation, SqlStore, SqliteStore, SqlserverStore, Store, StoreException
Constant Summary collapse
- Version =
The version.
'0.18.0'
- LibPath =
Library path.
File.dirname(__FILE__)
- NotNull =
{ :sql => 'NOT NULL' }.freeze
- Null =
{ :sql => 'NULL' }.freeze
Class Method Summary collapse
-
.setup(options = {}) ⇒ Object
(also: connect)
Helper method, useful to initialize Og.
-
.VarChar(size) ⇒ Object
Some useful type macros to help when defining properties.
Class Method Details
.setup(options = {}) ⇒ Object Also known as: connect
Helper method, useful to initialize Og.
148 149 150 151 152 |
# File 'lib/og/manager.rb', line 148 def setup( = {}) m = @@manager = Manager.new() m.manage_classes return m end |
.VarChar(size) ⇒ Object
Some useful type macros to help when defining properties. You can easily code your own type macros. Just return the array that should be passed to the property macro.
Example
property :name, VarChar(30)
11 12 13 |
# File 'lib/og/types.rb', line 11 def self.VarChar(size) return String, :sql => "VARCHAR(#{size})" end |