orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Execution.Sequence

Description

Interactions to work with database sequence values on the Haskell side, including inspection of the current and next values in the sequence as well as updating a sequence to a given value.

Since: 1.0.0.0

Synopsis

Documentation

sequenceNextValue :: MonadOrville m => SequenceDefinition -> m Int64 Source #

Fetches the next value from a sequence via the PostgreSQL nextval function.

Since: 1.0.0.0

sequenceCurrentValue :: MonadOrville m => SequenceDefinition -> m Int64 Source #

Fetches the current value from a sequence via the PostgreSQL currval function.

Since: 1.0.0.0

sequenceSetValue :: MonadOrville m => SequenceDefinition -> Int64 -> m Int64 Source #

Sets the current value from a sequence via the PostgreSQL setval function.

Since: 1.0.0.0