source: project/wiki/eggref/5/awful-postgresql @ 36434

Last change on this file since 36434 was 36434, checked in by Mario Domenech Goulart, 16 months ago

eggref/5/awful-postgresql: add documentation of awful-postgresql for CHICKEN 5

File size: 4.1 KB
Line 
1== awful-postgresql
2
3[[toc:]]
4
5=== Description
6
7Postgresql support for [[/eggref/4/awful|awful]].
8
9This extension provides the {{enable-db}} and
10{{switch-to-postgresql-database}} procedures which add Postgresql
11support for awful, based on the features provided by the
12[[/eggref/4/postgresql|postgresql egg]].
13
14
15=== Author
16
17[[/users/mario-domenech-goulart|Mario Domenech Goulart]]
18
19
20=== Repository
21
22[[https://github.com/mario-goulart/awful-postgresql|https://github.com/mario-goulart/awful-postgresql]]
23
24
25=== Requirements
26
27* [[/eggref/4/awful|awful]]
28* [[/eggref/4/postgresql|postgresql]]
29
30
31=== Procedures
32
33==== {{enable-db}}
34<procedure>(enable-db)</procedure>
35
36Enable Postgresql support for
37[[/eggref/4/awful|awful]].  This procedure
38basically sets up awful to use the connection, disconnection, query
39and query escaping procedures for Postgresql databases.
40
41==== {{switch-to-postgresql-database}}
42<procedure>(switch-to-postgresql-database)</procedure>
43
44Resets all the awful db-related parameters to postgresql values (for
45when using multiple databases under the same awful server).
46
47
48=== Parameters
49
50==== {{db-result-processor}}
51
52This parameter yields a one-argument procedure (the argument is the
53object representing the results as returned by the postgresql
54bindings).
55
56The default value is:
57
58<enscript highlight=scheme>
59(lambda (result)
60  (row-map identity result))
61</enscript>
62
63This parameter has been added in version 0.5.
64
65
66=== License
67
68 Copyright (c) 2008-2018, Mario Domenech Goulart
69 All rights reserved.
70 
71 Redistribution and use in source and binary forms, with or without
72 modification, are permitted provided that the following conditions are
73 met:
74 
75 Redistributions of source code must retain the above copyright
76 notice, this list of conditions and the following disclaimer.
77 
78 Redistributions in binary form must reproduce the above copyright
79 notice, this list of conditions and the following disclaimer in the
80 documentation and/or other materials provided with the distribution.
81 
82 Neither the name of the author nor the names of its contributors may
83 be used to endorse or promote products derived from this software
84 without specific prior written permission.
85 
86 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
87 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
88 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
89 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
90 COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
91 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
92 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
93 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
94 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
95 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
96 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
97 OF THE POSSIBILITY OF SUCH DAMAGE.
98
99
100=== Version history
101
102===== version 0.7.0
103* CHICKEN 5 support
104* Remove implementation of {{sql-quoter}} (deprecated in version 0.5)
105
106===== version 0.6.0
107* SSQL support
108* The default value for {{(db-inquirer)}}'s {{default}} keyword parameter is now {{'()}}. '''Warning''': this change may break your code!
109
110In case of an empty result set from a query, {{(db-inquirer)}} will
111now return {{'()}} instead of {{#f}}.
112
113This change can be specially harmful in case you have something like
114
115<enscript highlight=scheme>
116(or ($db "some query") "something")
117</enscript>
118
119In this example, if the query returns an empty result set, that
120expression would produce:
121
122* in older awful-postgresql versions: {{"something"}}
123* in awful-postgresql versions with this change: {{'()}}
124
125
126===== version 0.5.1
127* Fix application of {{db-result-processor}} (patch by Hugo Arregui)
128
129===== version 0.5
130* Added {{db-result-processor}} parameter (patch by Hugo Arregui)
131* Deprecated {{sql-quoter}} parameter
132
133===== version 0.4
134* Added {{switch-to-postgresql-database}} procedure
135
136===== version 0.3
137* {{db-inquirer}} supports the {{values}} keyword parameter (patch by Stephen Eilert)
138
139===== version 0.2
140* fix for {{sql-quoter}} (reflects on awful's {{sql-quote}})
141
142===== version 0.1
143* Initial release
Note: See TracBrowser for help on using the repository browser.