[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MySQL/MariaDB Boolean Type

From: Nala Ginrut
Subject: Re: MySQL/MariaDB Boolean Type
Date: Sat, 11 Mar 2023 03:00:37 +0800
User-agent: mu4e 1.4.15; emacs 27.1

Hi Jaft!
Aratnis had abstracted boolean type in mvc/model.scm
(define *db-specific-types*
(text . longtext)
(boolean . boolean))
(text . text)
(boolean . boolean))
(text . text)
(boolean . integer))))

You may use `boolean' to define a table in a model, for example:

'(id auto (#:primary-key))
'(name char-field (#:not-null #:maxlen 128))
'(is_admin boolean (#:not-null))
'(last_login bigint (#:unsigned #:not-null)))

I'm sorry I haven't put it in the document, I'll introduce it in the
recent release.

Best regards.

Jaft writes:

> I think I always meant to ask but keep forgetting to – what would you think, 
> Nala, of providing a boolean type?
> Both MySQL and MariaDB abstract this type for the user, already, so doing the 
> same at the Artanis layer wouldn't be terribly different than the DB 
> converting boolean values to 1 and 0, right?
> And it'd make working with those values easier to read when reading the code 
> of a project, for the first time.

GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]