SQLSyntaxSupport

scalikejdbc.SQLSyntaxSupportFeature.SQLSyntaxSupport
See theSQLSyntaxSupport companion object
trait SQLSyntaxSupport[A]

SQLSyntaxSupport trait. Companion object needs this trait as follows.

 case class Member(id: Long, name: Option[String])
 object Member extends SQLSyntaxSupport[Member]

Attributes

Companion
object
Source
SQLSyntaxSupportFeature.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Returns table name and alias name part in SQL. If alias name and table name are same, alias name will be skipped.

Returns table name and alias name part in SQL. If alias name and table name are same, alias name will be skipped.

 sql"select ${m.result.*} from ${Member.as(m)}"

Attributes

Source
SQLSyntaxSupportFeature.scala
def autoSession: DBSession

Auto session for current connection pool.

Auto session for current connection pool.

Attributes

Source
SQLSyntaxSupportFeature.scala
def clearLoadedColumns(): Unit

Clears column names loaded from JDBC metadata.

Clears column names loaded from JDBC metadata.

Attributes

Source
SQLSyntaxSupportFeature.scala
def column: ColumnName[A]

Returns ColumnName provider for this (expected to use for insert/update queries).

Returns ColumnName provider for this (expected to use for insert/update queries).

Attributes

Source
SQLSyntaxSupportFeature.scala
def columnNames: Seq[String]

If you prefer columnNames than columns, override this method to customize.

If you prefer columnNames than columns, override this method to customize.

Attributes

Source
SQLSyntaxSupportFeature.scala
def columns: Seq[String]

Column names for this table (default: column names that are loaded from JDBC metadata).

Column names for this table (default: column names that are loaded from JDBC metadata).

Attributes

Source
SQLSyntaxSupportFeature.scala

Connection Pool Name. If you use NamedDB, you must override this method.

Connection Pool Name. If you use NamedDB, you must override this method.

Attributes

Source
SQLSyntaxSupportFeature.scala

Delimiter for alias names in SQL.

Delimiter for alias names in SQL.

Attributes

Source
SQLSyntaxSupportFeature.scala
def forceUpperCase: Boolean

True if you need forcing upper column names in SQL.

True if you need forcing upper column names in SQL.

Attributes

Source
SQLSyntaxSupportFeature.scala
def nameConverters: Map[String, String]

Rule to convert field names to column names.

Rule to convert field names to column names.

 override val nameConverters = Map("^serviceCode$" -> "service_cd")

Attributes

Source
SQLSyntaxSupportFeature.scala
def schemaName: Option[String]

Schema name if exists.

Schema name if exists.

Attributes

Source
SQLSyntaxSupportFeature.scala

Returns SQLSyntax provider for this.

Returns SQLSyntax provider for this.

 val m = Member.syntax
 sql"select ${m.result.*} from ${Member as m}".map(Member(m.resultName)).list.apply()
 // select member.id as i_on_member, member.name as n_on_member from member

Attributes

Source
SQLSyntaxSupportFeature.scala
def syntax(name: String): QuerySQLSyntaxProvider[SQLSyntaxSupport[A], A]

Returns SQLSyntax provider for this.

Returns SQLSyntax provider for this.

 val m = Member.syntax("m")
 sql"select ${m.result.*} from ${Member as m}".map(Member(m.resultName)).list.apply()
 // select m.id as i_on_m, m.name as n_on_m from member m

Attributes

Source
SQLSyntaxSupportFeature.scala

scalikejdbc.interpolation.SQLSyntax value for table name.

scalikejdbc.interpolation.SQLSyntax value for table name.

Notice: Table name is specified with a String value which might be an input value.

Attributes

Source
SQLSyntaxSupportFeature.scala
def tableName: String

Table name (default: the snake_case name from this companion object's name).

Table name (default: the snake_case name from this companion object's name).

Attributes

Source
SQLSyntaxSupportFeature.scala
def tableNameWithSchema: String

Table name with schema name.

Table name with schema name.

Attributes

Source
SQLSyntaxSupportFeature.scala
def tableTypes: Array[String]

If you need some exotic table types like MATERIALIZED VIEW from PostgreSQL, override this method.

If you need some exotic table types like MATERIALIZED VIEW from PostgreSQL, override this method.

Attributes

Source
SQLSyntaxSupportFeature.scala
def useShortenedResultName: Boolean

True if you need shortening alias names in SQL.

True if you need shortening alias names in SQL.

Attributes

Source
SQLSyntaxSupportFeature.scala
def useSnakeCaseColumnName: Boolean

True if you need to convert field names to snake_case column names in SQL.

True if you need to convert field names to snake_case column names in SQL.

Attributes

Source
SQLSyntaxSupportFeature.scala