15.6.1 Connect to DB server ¶
;; usage 1:
(connect-db dbd init-str)
;; usage 2:
(connect-db dbd #:db-name "artanis" #:db-username "root" #:db-passwd ""
#:proto "tcp" #:host "localhost" #:port 3306)
- dbd is a string. It must match any of these: "mysql", "postgresql", or "sqlite3".
- init-str is a string for DB init, for example:
(connect-db "mysql" "root:123:artanis:tcp:localhost:3306")
#:db-name
specifies the DB name.
#:db-username
specifies the DB username.
#:proto
specifies the socket protocol, which is related to the DB server of your choice.
#:host
specifies the host name.
#:port
specifies the socket port.