Class: DB::Model::Table

Inherits:
Relation show all
Defined in:
lib/db/model/table.rb

Instance Attribute Summary

Attributes inherited from Relation

#cache, #context, #model

Instance Method Summary collapse

Methods inherited from Relation

#create, #each, #find, #first, #initialize, #insert, #inspect, #new, #predicate, #preload, #select, #to_a, #to_s, #update_cache, #where

Methods included from Countable

#count, #empty?

Methods included from Deletable

#delete

Constructor Details

This class inherits a constructor from DB::Model::Relation

Instance Method Details

#cache_keyObject



29
30
31
# File 'lib/db/model/table.rb', line 29

def cache_key
	[@model]
end

#truncateObject



33
34
35
# File 'lib/db/model/table.rb', line 33

def truncate
	Statement::Truncate.new(@model).call(@context)
end