postgresx

Extends moonbitlang/x types for use with moonbit-community/postgres

postgres
sqlc
sql
moon add kaashyapan/postgresx@0.2.0
Download zip
Version
0.2.0
License
Apache-2.0
Last updated
7 days ago
Downloads
24
README

#kasyapan/postgresx

Maps postgres types to moonbitlang/x types.

To be used with moonbit-community/postgres.

The package implements the toSql & fromSql traits required by moonbit-community/postgres to convert between postgres wire format and moonbit types

This package is used by sqlc-gen-moonbit in the generated Sql.

#
PostgresxError

pub(all) suberror PostgresxError {
UnexpectedNullorInvalid(String)
} derive(
Debug
)

#
DecimalSign

type DecimalSign derive(Eq, Show,
Debug
)

#
PgDate

impl FromSql for PgDate

#
PgDate::of_plain_date

#
PgDate::to_plain_date

fn PgDate::to_plain_date(self : PgDate) ->
PlainDate
raise

#
PgDate::to_string

fn PgDate::to_string(self : PgDate) -> Unit

#
PgInterval

type PgInterval derive(
Debug
)

#
PgInterval::of_period_duration

fn PgInterval::of_period_duration(interval : Interval) -> PgInterval

#
PgInterval::to_period_duration

fn PgInterval::to_period_duration(self : PgInterval) -> Interval raise

#
PgTime

impl FromSql for PgTime

#
PgTime::of_plain_time

#
PgTime::to_plain_time

fn PgTime::to_plain_time(self : PgTime) ->
PlainTime
raise

#
PgTime::to_string

fn PgTime::to_string(self : PgTime) -> Unit

#
PgTimestamp

type PgTimestamp derive(Show,
Debug
)

#
PgUUID

type PgUUID derive(Show)

#
get_as_serial

fn get_as_serial(bytes : Bytes?) -> Int raise

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io