Skip to content

Commit

Permalink
doc,database: document {maybe-,}id/c and in-row{,s}
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Oct 21, 2024
1 parent e6274a5 commit 3443ea4
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions koyo-doc/scribblings/database.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,30 @@ working with database connections.

}

@defthing[id/c contract?]{
An alias for @racket[exact-positive-integer?].
}

@defthing[maybe-id/c contract?]{
An alias for @racket[(or/c #f id/c)].
}

@defproc[(in-rows [conn connection?]
[stmt statement?]
[arg any/c] ...) sequence?]{

Like @racket[in-query], but every column is pre-processed to convert
null values to @racket[#f], arrays to lists, dates to Gregor dates,
and timestamp to Gregor moments.
}

@defproc[(in-row [conn connection?]
[stmt statement?]
[arg any/c] ...) sequence?]{

Like @racket[in-row], but stops iterating after the first result.
}

@defform[(if-null test-expr fallback-expr)]{
Returns @racket[fallback-expr] if @racket[test-expr] is either
@racket[(json-null)] or @racket[sql-null].
Expand Down

0 comments on commit 3443ea4

Please sign in to comment.