class

Marten::DB::Field::Int

Inherits Marten::DB::Field::Base / Reference / Object

Constructors

new(id : ::String, primary_key = false, auto : ::Bool = false, default : Int32 | Nil = nil, blank = false, null = false, unique = false, index = false, db_column = nil)
Source

Instance methods

auto?

Returns true if the field is automatically incremented.

Source
default

Returns the default value of the field if any.

Source
from_db(value) : Int32 | Int64 | Nil

Converts the raw DB value to the corresponding field value.

Source
from_db_result_set(result_set : ::DB::ResultSet) : Int32 | Int64 | Nil

Extracts the field value from a DB result set and returns the right object corresponding to this value.

Source
perform_validation(record : Model)

:nodoc:

Source
to_column

Returns a migration column object corresponding to the field at hand.

Source
to_db(value) : ::DB::Any

Converts the field value to the corresponding DB value.

Source