[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ttn-pers-scheme 0.15 available
From: |
thi |
Subject: |
ttn-pers-scheme 0.15 available |
Date: |
Wed, 7 Mar 2001 17:09:51 -0800 |
hello world,
taking an initial stab at abstracting postgres... db experts feel free
to take the code apart and let me know what you think. thanks go to Ian
Grant for guile-pg.
for tarball and friends see:
http://www.glug.org/people/ttn/software/ttn-pers-scheme/
NEWS excerpt follows.
thi
______________________________________
- VERSION 0.15 (released 2001/03/07)
- New module: (ttn stringutils)
This module was actually introduced in version 0.14 but not
documented then.
Four procedures are provided: `string-ws-trim',
`string/sep->substrings', `string-append/separator'
and `mapconcat'.
See docstrings for more info.
- New module: (ttn pgtable)
Four procedures are exported: `tuples-result->table',
`display-table', `where-clausifier' and `pgtable-manager'.
Docstrings are reproduced here.
- `tuples-result->table' RES
Extract data from the tuples result RES, and return an annotated
array. The array's values correspond to the data from RES, and
has dimensions `pg-ntuples' by `pg-nfields'. Annotations are
object properties:
names -- vector of field names
widths -- vector of maximum field widths
- `display-table' TABLE
Display table TABLE, including header and ASCII field-separators.
- `pgtable-manager' DB-NAME TABLE-NAME DEFS
Return a proc that manages a table specified by DB-NAME
TABLE-NAME DEFS. DB-NAME and TABLE-NAME are strings. DEFS is a
list of symbol pairs, the car being the field name and the cdr
the PostgreSQL type name. For example:
((time . timestamp)
(error . text)
(files . text[]))
The returned proc accepts a single arg CHOICE (a symbol) and
returns either the variable or procedure associated with CHOICE.
When CHOICE is `help' or `menu', return a list of accepted
choices. When CHOICE is `types-list', return a list of
supported PostgreSQL types.
- `where-clausifier' STRING
Return an SQL "where clause" from STRING.
- Changes to (ttn grep)
Both `grep' and `grep-matches' now understand a `count' flag
directing these procs to return the length of the result list
instead of the list itself. This flag can be used (in a list)
with the other flags.
- Testing news
There is a new file ttn/testing/ttn/check-pgtable.scm that tests
(ttn pgtable). By default, this is not enabled because there
are dependencies that are not easy to check for or guarantee (we
might get to it later, however).
See file README for instructions on how to get things to work.
[NEWS excerpt ends here]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ttn-pers-scheme 0.15 available,
thi <=