harness.sql

package harness.sql

Members list

Type members

Classlikes

final case class AppliedCol[T](tableVarName: String, col: Col[T])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object AppliedCol

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
AppliedCol.type
trait Atomically[E]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class IgnoreAtomicity[E]
trait WithConnection[E]
class Live[E]
class LiveRollback[E]
object Atomically

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Atomically.type
final case class Col[T](colName: String, colType: ColType, codec: QueryCodecSingle[T], nullable: Boolean, keyType: Option[KeyType])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Col[T]
object Col

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Col.type
final case class ColRef(tableVarName: String, colName: String)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class ConnectionFactory

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class Database

This represents access to an SQL database. When accessing your database, it could be in one of 3 states:

This represents access to an SQL database. When accessing your database, it could be in one of 3 states:

  • Pool : you are not in a transaction, and are able to execute as many parallel fibers as your pool will allow.
  • Transaction : you are in a db transaction, and are only able to execute 1 parallel fiber at a time.
  • Savepoint : you are in a db transaction + savepoint, and are only able to execute 1 parallel fiber at a time.

You can get a Transaction/Savepoint by using Atomically.atomically/Atomically.atomicScope. These can also be accessed via: Atomically.Live$.atomically/Atomically.Live$.atomicScope. The reason Transaction/Savepoint only support a single parallel fiber is because anything happening atomically in the db needs to be on a single connection, and transactions/savepoints are scoped to the entire connection. Otherwise, you could end up with a scenario like:

  • in transaction
    • fiber-a : in savepoint
    • fiber-b : in savepoint
    • fiber-a : insert R1
    • fiber-b : insert R2
    • fiber-a : insert R3
    • fiber-a : rollback (insertion of R2 is also rolled back)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Database

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Database.type
final case class DbConfig

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object DbConfig

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
DbConfig.type
final case class ForeignKeyRef

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ForeignKeyRef

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final class OptionEv[T]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object OptionEv

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
OptionEv.type
final class PreparedStatement

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class ResultSet[O](queryName: String, fragment: Fragment, rs: ResultSet, decoder: QueryDecoderMany[O])

Attributes

Supertypes
class Object
trait Matchable
class Any
abstract class Table extends Product

Attributes

Companion
object
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
class WithId[F, TKId]
class Migration[F]
object Table

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Table.type
abstract class TableQueries[Id <: Id, T <: ([F[_]] =>> WithId[F, Id])](implicit ti: TableSchema[T])

Attributes

Supertypes
class Object
trait Matchable
class Any
final case class TableSchema[T <: ([_[_]] =>> Table)](tableSchema: String, tableName: String, columns: T[Col], functorK: FunctorK[T], flatten: Flatten[T], codec: QueryCodecMany[T[Identity]], colChunk: Chunk[Col[_]], insertFragment: Fragment)

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TableSchema

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type