ShortCodec

com.augustnagro.magnum.DbCodec$.ShortCodec$
object ShortCodec extends DbCodec[Short]

Attributes

Graph
Supertypes
trait DbCodec[Short]
class Object
trait Matchable
class Any
Self type
ShortCodec.type

Members list

Value members

Concrete methods

def queryRepr: String

Syntax used when querying the db. For example,

Syntax used when querying the db. For example,

DbCodec[Int].queryRepr == "?"

DbCodec[(String, Boolean)].queryRepr = "(?, ?)"

case class User(id: Long, name: String) derives DbCodec DbCodec[User].queryRepr = "? ?"

Attributes

def readSingle(rs: ResultSet, pos: Int): Short

Read an E from the ResultSet starting at position pos and ending after reading cols number of columns. Make sure the ResultSet is in a valid state (ie, ResultSet::next has been called).

Read an E from the ResultSet starting at position pos and ending after reading cols number of columns. Make sure the ResultSet is in a valid state (ie, ResultSet::next has been called).

Attributes

def writeSingle(s: Short, ps: PreparedStatement, pos: Int): Unit

Write the entity to the PreparedStatement starting at position pos

Write the entity to the PreparedStatement starting at position pos

Attributes

Inherited methods

def biMap[E2](to: Short => E2, from: E2 => Short): DbCodec[E2]

Attributes

Inherited from:
DbCodec
def read(resultSet: ResultSet): Vector[E]

Build every row in the ResultSet into a sequence of E. The ResultSet should be in its initial position before calling (ie, ResultSet::next not called).

Build every row in the ResultSet into a sequence of E. The ResultSet should be in its initial position before calling (ie, ResultSet::next not called).

Attributes

Inherited from:
DbCodec
def readSingle(resultSet: ResultSet): E

Build an E from the ResultSet starting at position 1 and ending after reading cols number of columns. Make sure the ResultSet is in a valid state (ie, ResultSet::next has been called).

Build an E from the ResultSet starting at position 1 and ending after reading cols number of columns. Make sure the ResultSet is in a valid state (ie, ResultSet::next has been called).

Attributes

Inherited from:
DbCodec
def write(entities: Iterable[Short], ps: PreparedStatement): Unit

Writes multiple entities to the preparedStatement via PreparedStatement::addBatch

Writes multiple entities to the preparedStatement via PreparedStatement::addBatch

Attributes

Inherited from:
DbCodec
def writeSingle(entity: Short, ps: PreparedStatement): Unit

Write the entity to the resultSet starting at position 1

Write the entity to the resultSet starting at position 1

Attributes

Inherited from:
DbCodec

Concrete fields

val cols: IArray[Int]

The java.sql.Types constant for every "?" in queryRepr. For mapping database-specific types, Types.JAVA_OBJECT is recommended.

The java.sql.Types constant for every "?" in queryRepr. For mapping database-specific types, Types.JAVA_OBJECT is recommended.

Attributes