Return the primary key field as a String
Silvio::Database::Client
Inherits DB::Mappable / JSON::Serializable / Crecto::Schema::BelongsTo / Crecto::Schema::HasOne / Crecto::Schema::HasMany / Crecto::Schema / Crecto::Model / Reference / Object
Constants
macro constants CRECTO_VALID_FIELD_TYPES = [String, Int64, Int32, Int16, UInt64, UInt32, UInt16, UInt8, Float32, Float64, Bool, Time, Int32 | Int64, UInt32 | UInt64, Float32 | Float64, Json, PkeyValue, Array(String), Array(Int64), Array(Int32), Array(Int16), Array(UInt8), Array(UInt16), Array(UInt32), Array(UInt64) Array(Float32), Array(Float64), Array(Bool), Array(Time), Array(Int32 | Int64), Array(UInt32 | UInt64), Array(Float32 | Float64), Array(Json), Array(PkeyValue)]
Constructors
Class methods
Get the association type for the association i.e. :posts => :has_many
Get the foreign key for the association i.e. :posts => :user_id
Get the foreign key value from the relation object i.e. :posts, post => post.user_id
Get the Class for the assocation name i.e. :posts => Post
Set the value for the association i.e. :posts, user, [posts] => user.posts = [posts]
Get the through association symbol i.e. :posts => :user_posts (if has_many through)
Validates generic block against an instance of the class
Instance methods
Empty instance methods for mass assignment Implementations are in the Schema.setup macro
Instance properties
Instance properties
Builds fields' cast typed method
Returns the value of the primary key field
Builds a hash from all CRECTO_FIELDS defined