Active Record pattern implementation.
Creates a ActiveRecord instance for the given the object.
Creates a ActiveRecord instance for the given the object. That allows the user to save the given object using the Active Record pattern.
a instance of ActiveRecord associated to the given object.
Use this method to override the DatabaseAdapter's default column type for the given field (FieldMetaData), returning None means that no override will take place.
Use this method to override the DatabaseAdapter's default column type for the given field (FieldMetaData), returning None means that no override will take place.
There are two levels at which db column type can be overriden, in order of precedence :
on(professors)(p => declare( s.yearlySalary is(dbType("real")) ))
overrides (has precedence over) :
MySchema extends Schema { ... override def columnTypeFor(fieldMetaData: FieldMetaData, owner: Table[_]) = if(fieldMetaData.wrappedFieldType.isInstanceOf[Int) Some("number") else None }
protected since table declarations must only be done inside a Schema
protected since table declarations must only be done inside a Schema
the default database storage (column) length for String columns for this Schema, Can be overridden by the Column Annotation ex.: Column(length=256) default is 128
a Tuple2 with (LengthOfDecimal, Scale) that will determine the storage length of the database type that map fields of type java.lang.BigDecimal Can be overridden by the Column Annotation, ex.: Column(length=22, scale=20) default is (20,16)
This will drop all tables and related sequences in the schema.
This will drop all tables and related sequences in the schema... it's a dangerous operation, typically this is only useful for development database instances, the method is protected in order to make it a little less 'accessible'
protected since table declarations must only be done inside a Schema
protected since table declarations must only be done inside a Schema
Prints the schema to standard output, it is simply : schema.
Prints the schema to standard output, it is simply : schema.printDdl(println(_))