KeyedCrud

usql.dao.KeyedCrud
trait KeyedCrud[T] extends Crd[T]

CRUD (Create, Retrieve, Update, Delete) for keyed data.

Attributes

Graph
Supertypes
trait Crd[T]
class Object
trait Matchable
class Any
Known subtypes
class KeyedCrudBase[K, T]

Members list

Type members

Types

type Key

Type of the key

Type of the key

Attributes

Value members

Abstract methods

def deleteByKey(key: Key)(using ConnectionProvider): Int

Delete by key.

Delete by key.

Attributes

def findByKey(key: Key)(using ConnectionProvider): Option[T]

Find one by key.

Find one by key.

Attributes

def keyOf(value: T): Key

Returns the key of a value.

Returns the key of a value.

Attributes

def update(value: T)(using ConnectionProvider): Int

Update some value.

Update some value.

Attributes

Concrete methods

def findAgain(value: T)(using ConnectionProvider): Option[T]

Load some value again based upon key.

Load some value again based upon key.

Attributes

Inherited methods

def countAll()(using ConnectionProvider): Int

Count all instances.

Count all instances.

Attributes

Inherited from:
Crd
def deleteAll()(using ConnectionProvider): Int

Delete all instances.

Delete all instances.

Attributes

Inherited from:
Crd
def findAll()(using ConnectionProvider): Seq[T]

Find all instances

Find all instances

Attributes

Inherited from:
Crd
def insert(values: Seq[T])(using ConnectionProvider): Int

Insert many elements.

Insert many elements.

Attributes

Inherited from:
Crd
def insert(value1: T, value2: T, values: T*)(using ConnectionProvider): Int

Insert many elements

Insert many elements

Attributes

Inherited from:
Crd
def insert(value: T)(using ConnectionProvider): Int

Insert into database.

Insert into database.

Attributes

Inherited from:
Crd