DB.maybeA.3kaya

Langue: en

Version: March 2009 (fedora - 05/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

DB::maybeA - Convert a database result to a Maybe type

SYNOPSIS

Maybe<a> maybeA( a(DBValue) f, DBValue val )

ARGUMENTS

val A database result cell

f A function to convert a database result to a useable type, such as DB.bool(3kaya)

DESCRIPTION

Convert a database result to a Prelude.Maybe(3kaya) , returning nothing for a null, and containing a value converted by f otherwise.

AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

Prelude.Maybe(3kaya)

DB.DBValue(3kaya)

DB.bool(3kaya)

DB.float(3kaya)

DB.int(3kaya)

DB.string(3kaya)

DB.time(3kaya)