1PostgresDB.connect(3kaya)    Kaya module reference   PostgresDB.connect(3kaya)
2
3
4

NAME

6       PostgresDB::connect - Connect to a database.
7

SYNOPSIS

9       DBHandle<PGConnection> connect( String info )
10

ARGUMENTS

12       info  The  database host to connect to. The syntax for this argument is
13       described         in         the         Postgres         documentation
14http://www.postgresql.org/docs/8.2/static/libpq-connect.html
15
16

DESCRIPTION

18       Use  this  function  to  connect  to the database. You can then use the
19       functions from DB(3kaya) to query the database.
20
21
22    conninfo = "dbname='mysite' user='web' password='WHSpWXPPh5'";
23    db = PostgresDB::connect(conninfo);
24    res = exec(db,"SELECT * FROM pagedata WHERE page_id = 10");
25

AUTHORS

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

LICENSE

31       The  Kaya  standard  library  is free software; you can redistribute it
32       and/or modify it under the terms  of  the  GNU  Lesser  General  Public
33       License  (version  2.1  or  any later version) as published by the Free
34       Software Foundation.
35
37       DB(3kaya)
38
39
40
41Kaya                             December 2010       PostgresDB.connect(3kaya)
Impressum