Skip to content

Commit 77f8ba8

Browse files
author
James William Pye
committed
Just call them libraries.
Symbols are evolving into references to arbitrary database objects, so it doesn't make much sense to call them "query libraries" anymore.
1 parent 767355f commit 77f8ba8

1 file changed

Lines changed: 19 additions & 20 deletions

File tree

postgresql/documentation/lib.txt

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Categories and Query Libraries
2-
******************************
1+
Categories and Libraries
2+
************************
33

44
This chapter discusses the usage and implementation of connection categories and
5-
query libraries.
5+
libraries.
66

77
.. note::
88
First-time users are encouraged to read the `Audience and Motivation`_
99
section first.
1010

11-
Query libraries are a collection of SQL statements that can be bound to a
11+
Libraries are a collection of SQL statements that can be bound to a
1212
connection. Libraries are *normally* bound directly to the connection object as
1313
an attribute using a name specified by the library.
1414

@@ -24,19 +24,19 @@ statement is to be used. The user may state the default execution method of
2424
the statement object, or whether the symbol is to be preloaded at bind
2525
time--these properties are Symbol Annotations.
2626

27-
The purpose of query libraries is to provide a means to manage statements on
27+
The purpose of libraries are to provide a means to manage statements on
2828
disk and at runtime. ILFs provide a means to reference a collection
2929
of statements on disk, and, when loaded, the symbol bindings provides means to
3030
reference a statement already prepared for use on a given connection.
3131

3232
The `postgresql.lib` package-module provides fundamental classes for supporting
33-
categories and query libraries.
33+
categories and libraries.
3434

3535

36-
Writing Query Libraries
37-
=======================
36+
Writing Libraries
37+
=================
3838

39-
ILF files are the recommended way to build a query library. These files use the
39+
ILF files are the recommended way to build a library. These files use the
4040
naming convention "lib{NAME}.sql". The prefix and suffix are used describe the
4141
purpose of the file and to provide a hint to editors that SQL highlighting
4242
should be used. The format of an ILF takes the form::
@@ -179,8 +179,8 @@ In use::
179179
will be returned.
180180

181181

182-
Using Query Libraries
183-
=====================
182+
Using Libraries
183+
===============
184184

185185
After a library is created, it must be loaded before it can be bound using
186186
programmer interfaces. The `postgresql.lib.load` interface provides the
@@ -297,11 +297,10 @@ that can be used in ILF libraries:
297297
Symbol Execution Methods
298298
========================
299299

300-
One of the primary features of query libraries is the ability to state how a
301-
statement is going to be used. Specifically, which
302-
`postgresql.api.PreparedStatement` method should be executed when a Bound Symbol
303-
is called. The following is a list of the symbol execution methods and the
304-
effect it will have when invoked:
300+
The Symbol Execution Method provides a way to specify how a statement is going
301+
to be used. Specifically, which `postgresql.api.PreparedStatement` method
302+
should be executed when a Bound Symbol is called. The following is a list of
303+
the symbol execution methods and the effect it will have when invoked:
305304

306305
``<default>`` (Empty component)
307306
Returns the entire result set in a single list object. If the statement does
@@ -434,7 +433,7 @@ Audience and Motivation
434433
=======================
435434

436435
This chapter covers advanced material. It is **not** recommended that categories
437-
and query libraries be used for trivial applications or introductory projects.
436+
and libraries be used for trivial applications or introductory projects.
438437

439438
.. note::
440439
Libraries and categories are not likely to be of interest to ORM or DB-API users.
@@ -473,9 +472,9 @@ simple, but it will be exhausting if repeated and error prone if the
473472
initialization condition is not factored out. Additionally, if access to statement
474473
metadata is needed, the above example is still lacking as it would require
475474
execution of the statement and further protocol expectations to be established.
476-
This is the province of query libraries: direct database interface management.
475+
This is the province of libraries: direct database interface management.
477476

478-
Query libraries and categories are used to factor out and simplify
477+
Categories and Libraries are used to factor out and simplify
479478
the above functionality so re-implementation is unnecessary. For example, an
480479
ILF library containing the symbol::
481480

@@ -532,6 +531,6 @@ The following terms are used throughout this chapter:
532531

533532
Category
534533
An object supporting a classification for connectors that provides database
535-
initialization facilities for produced connections. For query libraries,
534+
initialization facilities for produced connections. For libraries,
536535
`postgresql.lib.Category` objects are a set of Libraries,
537536
`postgresql.lib.Library`.

0 commit comments

Comments
 (0)