doobie
Members list
Type members
Classlikes
Result of TableDefinition.as.
Result of TableDefinition.as.
Value parameters
- alias
-
the alias of the table, for example "u".
- name
-
the name of the table with the alias, for example "users AS u".
- original
-
the original TableDefinition.
Attributes
- Source
- TableDefinition.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TableNameclass Objecttrait Matchableclass AnyShow all
A definition of a single column in the database of type A.
A definition of a single column in the database of type A.
Example:
object SpecialWeaponStats extends TableDefinition("special_weapon_stats") {
lazy val userId = Column[UserId]("user_id")
lazy val weaponId = Column[WeaponGuid]("weapon_id")
lazy val kills = Column[WeaponKills]("kills")
}
Value parameters
- prefix
-
the prefix of the table that this column belongs to, if specified. This is Some after you use prefixedWith.
- rawName
-
the name of the column in the database
Attributes
- Companion
- object
- Source
- Column.scala
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait TypedFragment[A]trait SQLDefinition[A]trait TypedMultiFragment[A]class Objecttrait Matchableclass AnyShow all
- Self type
-
Column[A]
Attributes
- Companion
- class
- Source
- Column.scala
- Supertypes
- Self type
-
Column.type
Allows you to select columns in a type-safe way.
Allows you to select columns in a type-safe way.
Example:
val columns = Columns((nameCol.tmf, ageCol.tmf, pet1Col.tmf, pet2Col.tmf))
val resultQuery: Query0[(String, Int, String, Option[String])] =
sql"SELECT $columns FROM $personWithPetsTable".queryOf(columns)
Type parameters
- QueryResult
-
the type of
Fragment.queryOf(columns)
expression.
Value parameters
- sql
-
returns the names of the columns, for example "name, surname, age".
Attributes
- Companion
- object
- Source
- Columns.scala
- Supertypes
Attributes
- Companion
- class
- Source
- Columns.scala
- Supertypes
- Self type
-
Columns.type
Attributes
- Source
- Composite.scala
- Supertypes
- Self type
-
Composite.type
Attributes
- Source
- FragmentExtensions.scala
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Source
- extensions.scala
- Supertypes
An SQL definition that produces a value of type A.
An SQL definition that produces a value of type A.
The definition can be either:
Attributes
- Companion
- object
- Source
- SQLDefinition.scala
- Supertypes
- Known subtypes
-
class Column[A]trait WithSQLDefinition[A]
- Self type
Attributes
- Companion
- trait
- Source
- SQLDefinition.scala
- Supertypes
- Self type
-
SQLDefinition.type
Defines a table.
Defines a table.
Example:
object Users extends TableDefinition("users") {
val id = Column[Int]("id")
}
Value parameters
- rawName
-
the name in database of the table.
Attributes
- Companion
- object
- Source
- TableDefinition.scala
- Supertypes
Attributes
- Companion
- class
- Source
- TableDefinition.scala
- Supertypes
- Self type
-
TableDefinition.type
Attributes
- Companion
- object
- Source
- TableDefinition.scala
- Supertypes
- Known subtypes
-
class AliasedTableDefinition[T]class TableDefinition
Attributes
- Companion
- trait
- Source
- TableDefinition.scala
- Supertypes
- Self type
-
TableName.type
A doobie fragment that refers to a single column/value which produces a value of type A.
A doobie fragment that refers to a single column/value which produces a value of type A.
Attributes
- Companion
- object
- Source
- TypedFragment.scala
- Supertypes
- Known subtypes
-
class Column[A]
Attributes
- Companion
- trait
- Source
- TypedFragment.scala
- Supertypes
- Self type
-
TypedFragment.type
A doobie fragment that potentially refers to a multiple columns/values (such as SQLDefinition) which produces a value of type A.
A doobie fragment that potentially refers to a multiple columns/values (such as SQLDefinition) which produces a value of type A.
Exists so that Columns could support Column, SQLDefinition, TypedFragment and TypedMultiFragment.
Attributes
- Companion
- object
- Source
- TypedMultiFragment.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- TypedMultiFragment.scala
- Supertypes
- Self type
-
TypedMultiFragment.type
Attributes
- Source
- extensions.scala
- Supertypes
Allows you to inline a SQLDefinition.
Allows you to inline a SQLDefinition.
This is useful when you want to expose the Read and Write of the A in the companion object.
Example:
case class Row(matchId: MatchId, userData: UserData)
object Row extends WithSQLDefinition[Row](Composite((
matchId.sqlDef, UserData.sqlDef
))(Row.apply)(Tuple.fromProductTyped))
Attributes
- Source
- WithSQLDefinition.scala
- Supertypes
Value members
Concrete methods
Generates the SQL for INSERT INTO table (column1, column2, ...) VALUES (value1, value2, ...)
.
Generates the SQL for INSERT INTO table (column1, column2, ...) VALUES (value1, value2, ...)
.
Example:
insertInto(tables.InventoryCharacters, NonEmptyVector.of(
tables.InventoryCharacters.userId --> c.userId,
tables.InventoryCharacters.guid --> c.guid
))
Attributes
- Source
- fragments.scala
Generates the SQL for UPDATE table SET column1 = value1, column2 = value2, ...
.
Generates the SQL for UPDATE table SET column1 = value1, column2 = value2, ...
.
Example:
updateTable(tables.InventoryCharacters, NonEmpty.createVector(
tables.InventoryCharacters.handgun1 --> loadouts.sets.set1.weapons.handgun,
tables.InventoryCharacters.handgun2 --> loadouts.sets.set2.weapons.handgun
))
Attributes
- Source
- fragments.scala
Overload of updateTable for convenience.
Extensions
Extensions
Example:
Example:
List(1, 2, 3).mapIntercalate("Words: ", ", ")((str, num) => s"$str$num")
// "Words: 1, 2, 3"
Value parameters
- separator
-
the values that go between the elements
- starting
-
the starting value
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
Attributes
- Source
- extensions.scala
As doobie.util.update.Update.updateManyWithGeneratedKeys but typesafe.
As doobie.util.update.Update.updateManyWithGeneratedKeys but typesafe.
Attributes
- Source
- extensions.scala
Implicits
Implicits
Attributes
- Source
- FragmentExtensions.scala