PgSchema

org.squeryl.pg.PgSchema
class PgSchema(implicit fieldMapper: FieldMapper) extends Schema

Attributes

Source
PgSchema.scala
Graph
Supertypes
class Schema
class Object
trait Matchable
class Any

Members list

Type members

Inherited classlikes

class ActiveRecord[A](a: A, queryDsl: QueryDsl, m: ClassTag[A])

Active Record pattern implementation. Enables the user to insert an object in its existent table with a convenient

Active Record pattern implementation. Enables the user to insert an object in its existent table with a convenient

save

method.

Attributes

Inherited from:
Schema
Source
Schema.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Schema
Source
Schema.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
Schema
Source
Schema.scala
Supertypes
class Object
trait Matchable
class Any
class ReferentialActionImpl(token: String, ev: ReferentialEvent) extends ReferentialAction

Attributes

Inherited from:
Schema
Source
Schema.scala
Supertypes
class Object
trait Matchable
class Any
class ReferentialEvent(val eventName: String)

Attributes

Inherited from:
Schema
Source
Schema.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

protected def srf[T]()(implicit man: ClassTag[T]): Seq[ExpressionNode] => View[T]

Attributes

Source
PgSchema.scala
protected def srf[T](name: String)(implicit man: ClassTag[T]): Seq[ExpressionNode] => View[T]

Attributes

Source
PgSchema.scala
protected def srf[T](name: String, prefix: String)(implicit man: ClassTag[T]): Seq[ExpressionNode] => View[T]

Attributes

Source
PgSchema.scala

Inherited methods

def applyDefaultForeignKeyPolicy(foreignKeyDeclaration: ForeignKeyDeclaration): Unit

Attributes

Inherited from:
Schema
Source
Schema.scala

Attributes

Inherited from:
Schema
Source
Schema.scala
def columnNameFromPropertyName(propertyName: String): String

Attributes

Inherited from:
Schema
Source
Schema.scala
def columnTypeFor(fieldMetaData: FieldMetaData, owner: Table[_]): Option[String]

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 overridden, 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 }

Attributes

Inherited from:
Schema
Source
Schema.scala
def columns(fieldList: TypedExpression[_, _]*): ColGroupDeclaration

Attributes

Inherited from:
Schema
Source
Schema.scala
def create: Unit

Attributes

Inherited from:
Schema
Source
Schema.scala

Attributes

Inherited from:
Schema
Source
Schema.scala

Attributes

Inherited from:
Schema
Source
Schema.scala

Attributes

Returns

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

Inherited from:
Schema
Source
Schema.scala
def defaultSizeOfBigDecimal: (Int, Int)

Attributes

Returns

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)

Inherited from:
Schema
Source
Schema.scala
def drop: Unit

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'

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'

Attributes

Inherited from:
Schema
Source
Schema.scala
def findAllTablesFor[A](c: Class[A]): Iterable[Table[_]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def findTablesFor[A](a: A): Iterable[Table[A]]

Attributes

Inherited from:
Schema
Source
Schema.scala
def name: Option[String]

Attributes

Inherited from:
Schema
Source
Schema.scala
def printDdl(statementHandler: String => Unit): Unit

Value parameters

statementHandler

is a closure that receives every declaration in the schema.

Attributes

Inherited from:
Schema
Source
Schema.scala
def printDdl(pw: PrintWriter): Unit

Attributes

Inherited from:
Schema
Source
Schema.scala
def printDdl: Unit

Prints the schema to standard output, it is simply : schema.printDdl(println(_))

Prints the schema to standard output, it is simply : schema.printDdl(println(_))

Attributes

Inherited from:
Schema
Source
Schema.scala
protected def table[T](name: String)(optionalFieldsInfo: Map[String, Class[_]])(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
inline protected def table[T](name: String)(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
protected def table[T](name: String, prefix: String)(optionalFieldsInfo: Map[String, Class[_]])(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
inline protected def table[T](name: String, prefix: String)(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
protected def table[T](optionalFieldsInfo: Map[String, Class[_]])(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
inline protected def table[T]()(implicit manifestT: ClassTag[T], ked: OptionalKeyedEntityDef[T, _]): Table[T]

Attributes

Inherited from:
TableDefinitionInSchema
Source
TableDefinitionInSchema.scala
def tableNameFromClass(c: Class[_]): String

Attributes

Inherited from:
Schema
Source
Schema.scala
def tableNameFromClassName(tableName: String): String

Attributes

Inherited from:
Schema
Source
Schema.scala
def tables: Seq[Table[_]]

Attributes

Inherited from:
Schema
Source
Schema.scala

Implicits

Inherited implicits

implicit def anyRef2ActiveTransaction[A](a: A)(implicit queryDsl: QueryDsl, m: ClassTag[A]): ActiveRecord[A]

Creates a ActiveRecord instance for the given the object. That allows the user to save the given object using the Active Record pattern.

Creates a ActiveRecord instance for the given the object. That allows the user to save the given object using the Active Record pattern.

Attributes

Returns

a instance of ActiveRecord associated to the given object.

Inherited from:
Schema
Source
Schema.scala