ldbc.connector

package ldbc.connector

Members list

Type members

Classlikes

object Connection

Attributes

Source
Connection.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Connection.type

Attributes

Companion
trait
Source
ConnectionProvider.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Connector

Attributes

Source
Connector.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Connector.type
trait LdbcConnection[F[_]] extends Connection[F]

A connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.

A connection (session) with a specific database. SQL statements are executed and results are returned within the context of a connection.

Type parameters

F

the effect type

Attributes

Source
LdbcConnection.scala
Supertypes
trait Connection[F]
class Object
trait Matchable
class Any
trait MySQLConfig

Configuration for MySQL database connections.

Configuration for MySQL database connections.

This trait provides a fluent API for configuring MySQL connection parameters including host, port, authentication, SSL settings, and various connection options.

Attributes

Example
val config = MySQLConfig.default
 .setHost("localhost")
 .setPort(3306)
 .setUser("myuser")
 .setPassword("mypassword")
 .setDatabase("mydatabase")
 .setSSL(SSL.Trusted)
Companion
object
Source
MySQLConfig.scala
Supertypes
class Object
trait Matchable
class Any
object MySQLConfig

Companion object for MySQLConfig providing factory methods.

Companion object for MySQLConfig providing factory methods.

Attributes

Companion
trait
Source
MySQLConfig.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class MySQLDataSource[F[_], A](host: String, port: Int, user: String, logHandler: Option[LogHandler[F]], password: Option[String], database: Option[String], debug: Boolean, ssl: SSL, socketOptions: List[SocketOption], readTimeout: Duration, allowPublicKeyRetrieval: Boolean, databaseTerm: Option[DatabaseTerm], tracer: Option[Tracer[F]], useCursorFetch: Boolean, useServerPrepStmts: Boolean, before: Option[(Connection[F]) => F[A]], after: Option[(A, Connection[F]) => F[Unit]])(implicit evidence$1: Async[F], evidence$2: Network[F], evidence$3: Console[F], evidence$4: Hashing[F], evidence$5: UUIDGen[F]) extends DataSource[F]

A DataSource implementation for MySQL connections using the pure Scala MySQL wire protocol.

A DataSource implementation for MySQL connections using the pure Scala MySQL wire protocol.

This DataSource provides connection pooling capabilities and manages MySQL connections with support for SSL, authentication, prepared statements, and various connection options. It also supports lifecycle hooks that can be executed before and after connection acquisition.

Type parameters

A

the type of value returned by the before hook

F

the effect type (e.g., IO, Task) that must have Async, Network, Console, Hashing, and UUIDGen capabilities

Value parameters

after

optional hook to execute after a connection is used

allowPublicKeyRetrieval

whether to allow retrieval of RSA public keys from the server

before

optional hook to execute before a connection is acquired

database

the default database to use upon connection

databaseTerm

the database terminology to use (CATALOG or SCHEMA)

debug

whether to enable debug logging for connections

host

the hostname or IP address of the MySQL server

logHandler

optional handler for logging connection and query events

password

the password for authenticating with the MySQL server

port

the port number on which the MySQL server is listening

readTimeout

the timeout duration for read operations

socketOptions

socket-level options for the TCP connection

ssl

the SSL configuration for secure connections

tracer

optional OpenTelemetry tracer for distributed tracing

useCursorFetch

whether to use cursor-based fetching for result sets

useServerPrepStmts

whether to use server-side prepared statements

user

the username for authenticating with the MySQL server

Attributes

Example
val dataSource = MySQLDataSource[IO, Unit](
 host = "localhost",
 port = 3306,
 user = "myuser",
 password = Some("mypassword"),
 database = Some("mydatabase"),
 ssl = SSL.Trusted
)
// With lifecycle hooks
val dataSourceWithHooks = dataSource
 .withBefore(conn => IO.println("Connection acquired"))
 .withAfter((_, conn) => IO.println("Connection released"))
Companion
object
Source
MySQLDataSource.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait DataSource[F]
class Object
trait Matchable
class Any
Show all

Companion object for MySQLDataSource providing factory methods.

Companion object for MySQLDataSource providing factory methods.

Attributes

Companion
class
Source
MySQLDataSource.scala
Supertypes
class Object
trait Matchable
class Any
Self type
class MysqlSavepoint(name: String) extends Savepoint

Represents SQL SAVEPOINTS in MySQL.

Represents SQL SAVEPOINTS in MySQL.

Attributes

Source
MysqlSavepoint.scala
Supertypes
trait Savepoint
class Object
trait Matchable
class Any
trait SSL

Attributes

Companion
object
Source
SSL.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object None
object System
object Trusted
Self type
SSL
object SSL

Attributes

Companion
trait
Source
SSL.scala
Supertypes
class Object
trait Matchable
class Any
Self type
SSL.type

Deprecated classlikes

trait ConnectionProvider[F[_], A] extends Provider[F]

Attributes

Companion
object
Deprecated
true
Source
ConnectionProvider.scala
Supertypes
trait Provider[F]
class Object
trait Matchable
class Any

Types

type Connection[F[_]] = Connection[F]

Attributes

Source
Connection.scala

Exports

Defined exports

final type Connector = [F[_]] =>> Connector[F]
Exported from ldbc

Attributes

Source
package.scala
final type DataSource = [F[_]] =>> DataSource[F]
Exported from ldbc

Attributes

Source
package.scala

Deprecated defined exports

final type Provider = [F[_]] =>> Provider[F]
Exported from ldbc

Attributes

Deprecated
true
Source
package.scala