Database
Database for the Anorm wrapper
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass AnyShow all
- Self type
-
Database.type
Members list
Type members
Inherited types
Attributes
- Inherited from:
- DatabaseModuleTestOps
Attributes
- Inherited from:
- DatabaseModuleBase
Value members
Concrete methods
Creates a Database Layer which requires an existing ConnectionSource.
Creates a Database Layer which requires an existing ConnectionSource.
Attributes
- Definition Classes
-
DatabaseModuleBase
A Connection which is incapable of running anything, to use when unit testing (and the queries are actually stubbed, so they do not need a Database). Trying to run actual queries against it will fail.
A Connection which is incapable of running anything, to use when unit testing (and the queries are actually stubbed, so they do not need a Database). Trying to run actual queries against it will fail.
Attributes
- Definition Classes
-
DatabaseModuleTestOps
Inherited methods
Provides that ZIO with a Connection. All DB action in the ZIO will be auto-committed. Failures in the initial ZIO will be wrapped in a Right in the error case of the resulting ZIO, with connection errors resulting in a failure with the exception wrapped in a Left.
Provides that ZIO with a Connection. All DB action in the ZIO will be auto-committed. Failures in the initial ZIO will be wrapped in a Right in the error case of the resulting ZIO, with connection errors resulting in a failure with the exception wrapped in a Left.
This method should be implemented by subclasses, to provide the connection.
Attributes
- Definition Classes
-
DatabaseModuleBase -> DatabaseOps
- Inherited from:
- DatabaseModuleBase
As autoCommit
, but errors when handling the connections are treated as defects instead of failures.
As autoCommit
, but errors when handling the connections are treated as defects instead of failures.
Attributes
- Inherited from:
- DatabaseOps
As autoCommitOrDie
, for ZStream instances instead of ZIO instances.
As autoCommitOrDie
, for ZStream instances instead of ZIO instances.
Attributes
- Inherited from:
- DatabaseOps
As autoCommit
, but exceptions are simply widened to a common failure type. The resulting failure type is a superclass of both DbException and the error type of the inital ZIO.
As autoCommit
, but exceptions are simply widened to a common failure type. The resulting failure type is a superclass of both DbException and the error type of the inital ZIO.
Attributes
- Inherited from:
- DatabaseOps
As autoCommitOrWiden
, for ZStream instances instead of ZIO instances.
As autoCommitOrWiden
, for ZStream instances instead of ZIO instances.
Attributes
- Inherited from:
- DatabaseOps
As autoCommit
, for ZStream instances instead of ZIO instances.
As autoCommit
, for ZStream instances instead of ZIO instances.
This method should be implemented by subclasses, to provide the connection.
Attributes
- Definition Classes
-
DatabaseModuleBase -> DatabaseOps
- Inherited from:
- DatabaseModuleBase
As fromDatasource
, but provides a default ErrorStrategiesRef. When a method is called with no available implicit ErrorStrategiesRef, the ErrorStrategiesRef in argument will be used.
As fromDatasource
, but provides a default ErrorStrategiesRef. When a method is called with no available implicit ErrorStrategiesRef, the ErrorStrategiesRef in argument will be used.
Attributes
- Inherited from:
- DatabaseModuleBase
Commodity method: creates a Database Layer which includes its own ConnectionSource based on a DataSource. Most connection pool implementations should be able to provide you a DataSource.
Commodity method: creates a Database Layer which includes its own ConnectionSource based on a DataSource. Most connection pool implementations should be able to provide you a DataSource.
When no implicit ErrorStrategies is available, the default ErrorStrategies will be used.
Attributes
- Inherited from:
- DatabaseModuleBase
As fromDatasource(ErrorStrategiesRef)
, but an ErrorStrategies
is provided through a layer instead of as a parameter.
As fromDatasource(ErrorStrategiesRef)
, but an ErrorStrategies
is provided through a layer instead of as a parameter.
Attributes
- Inherited from:
- DatabaseModuleBase
A Database which is incapable of running anything, to use when unit testing (and the queries are actually stubbed, so they do not need a Database). Trying to run actual queries against it will fail.
A Database which is incapable of running anything, to use when unit testing (and the queries are actually stubbed, so they do not need a Database). Trying to run actual queries against it will fail.
Attributes
- Inherited from:
- DatabaseModuleTestOps
Provides that ZIO with a Connection. A transaction will be opened before any actions in the ZIO, and closed after. It will commit only if the ZIO succeeds, and rollback otherwise. Failures in the initial ZIO will be wrapped in a Right in the error case of the resulting ZIO, with connection errors resulting in a failure with the exception wrapped in a Left.
Provides that ZIO with a Connection. A transaction will be opened before any actions in the ZIO, and closed after. It will commit only if the ZIO succeeds, and rollback otherwise. Failures in the initial ZIO will be wrapped in a Right in the error case of the resulting ZIO, with connection errors resulting in a failure with the exception wrapped in a Left.
This method should be implemented by subclasses, to provide the connection.
Attributes
- Definition Classes
-
DatabaseModuleBase -> DatabaseOps
- Inherited from:
- DatabaseModuleBase
As transaction
, but errors when handling the connections are treated as defects instead of failures.
As transaction
, but errors when handling the connections are treated as defects instead of failures.
Attributes
- Inherited from:
- DatabaseOps
As transactionOrDie
, for ZStream instances instead of ZIO instances.
As transactionOrDie
, for ZStream instances instead of ZIO instances.
Attributes
- Definition Classes
-
DatabaseModuleBase -> DatabaseOps
- Inherited from:
- DatabaseModuleBase
As transaction
, but exceptions are simply widened to a common failure type. The resulting failure type is a superclass of both DbException and the error type of the inital ZIO.
As transaction
, but exceptions are simply widened to a common failure type. The resulting failure type is a superclass of both DbException and the error type of the inital ZIO.
Attributes
- Inherited from:
- DatabaseOps
Deprecated and Inherited methods
Attributes
- Deprecated
-
[Since version 4.0.0]
- Inherited from:
- DatabaseOps
Attributes
- Deprecated
-
[Since version 4.0.0]
- Inherited from:
- DatabaseOps
Attributes
- Deprecated
-
[Since version 4.0.0]
- Inherited from:
- DatabaseOps
Attributes
- Deprecated
-
[Since version 4.0.0]
- Inherited from:
- DatabaseOps
Attributes
- Deprecated
-
[Since version 4.0.0]
- Inherited from:
- DatabaseOps
Attributes
- Deprecated
-
[Since version 0.4.0]
- Inherited from:
- DatabaseOps