X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=trunk%2Fpsycopg2%2Fdoc%2Fapi%2Fprivate%2Fpsycopg2-module.html;fp=trunk%2Fpsycopg2%2Fdoc%2Fapi%2Fprivate%2Fpsycopg2-module.html;h=dd7e92d5a99e6dbc00c12372f655b6b36d1d2912;hb=5a4c1b1278ffa01e630fde47f7c54888ed20a576;hp=0000000000000000000000000000000000000000;hpb=cee5ab52df1c9f38b6eaff2dd354cb22f59028c7;p=plcapi.git diff --git a/trunk/psycopg2/doc/api/private/psycopg2-module.html b/trunk/psycopg2/doc/api/private/psycopg2-module.html new file mode 100644 index 0000000..dd7e92d --- /dev/null +++ b/trunk/psycopg2/doc/api/private/psycopg2-module.html @@ -0,0 +1,336 @@ + + + + + psycopg2 + + + + + + + + + + + + + + + + + + + +
+ + Package psycopg2 +
+
+ + +
[show private | hide private]
[frames | no frames]
+ + +

Package psycopg2

+ +

A Python driver for PostgreSQL

+

psycopg is a PostgreSQL database adapter for the Python programming +language. This is version 2, a complete rewrite of the original code to +provide new-style classes for connection and cursor objects and other sweet +candies. Like the original, psycopg 2 was written with the aim of being very +small and fast, and stable as a rock.

+

Homepage: http://initd.org/projects/psycopg2

+
+ + + + + + +
Submodules
    +
  • extensions: psycopg extensions to the DBAPI-2.0
  • +
  • extras: Miscellaneous goodies for psycopg2
  • +
  • pool: Connection pooling for psycopg2
  • +
  • psycopg1: psycopg 1.1.x compatibility module
  • +
  • tz: tzinfo implementations for psycopg2
  • +
  • _psycopg: psycopg PostgreSQL driver
  • +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Exceptions
+ DatabaseErrorError related to the database engine.
+ DataErrorError related to problems with the processed data.
+ ErrorBase class for error exceptions.
+ IntegrityErrorError related to database integrity.
+ InterfaceErrorError related to the database interface.
+ InternalErrorThe database encountered an internal error.
+ NotSupportedErrorA not supported datbase API was called.
+ OperationalErrorError related to database operation (disconnect, memory allocation etc).
+ ProgrammingErrorError related to database programming (SQL error, table not found etc).
+ WarningA database warning.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Function Summary
    Connections creation
extensions.connectionconnect(dsn, + ...) +
+Create a new database connection.
    Value objects constructors
new binary objectBinary(buffer) +
+Build an object capable to hold a bynary string value.
new dateDate(year, + month, + day) +
+Build an object holding a date value.
new dateDateFromTicks(ticks) +
+Build an object holding a date value from the given ticks value.
new timeTime(hour, + minutes, + seconds, + tzinfo) +
+Build an object holding a time value.
new timeTimeFromTicks(ticks) +
+Build an object holding a time value from the given ticks value.
new timestampTimestamp(year, + month, + day, + hour, + minutes, + seconds, + tzinfo) +
+Build an object holding a timestamp value.
new timestampTimestampFromTicks(ticks) +
+Build an object holding a timestamp value from the given ticks value.

+ + + + + + +
Function Details
+ + +
+

connect(dsn, + ...) +

+

Create a new database connection.

+

This function supports two different but equivalent sets of arguments. +A single data source name or dsn string can be used to specify the +connection parameters, as follows:

+
+psycopg2.connect("dbname=xxx user=xxx ...")
+
+

If dsn is not provided it is possible to pass the parameters as +keyword arguments; e.g.:

+
+psycopg2.connect(database='xxx', user='xxx', ...)
+
+

The full list of available parameters is:

+
    +
  • dbname -- database name (only in 'dsn')
  • +
  • database -- database name (only as keyword argument)
  • +
  • host -- host address (defaults to UNIX socket if not provided)
  • +
  • port -- port number (defaults to 5432 if not provided)
  • +
  • user -- user name used to authenticate
  • +
  • password -- password used to authenticate
  • +
  • sslmode -- SSL mode (see PostgreSQL documentation)
  • +
+

If the connection_factory keyword argument is not provided this +function always return an instance of the connection class. +Else the given sub-class of extensions.connection will be used to +instantiate the connection object.

+
+
Returns:
+
+New database connection
           + (type=extensions.connection) +
+
+
+
+ + +
+

Binary(buffer) +

+

Build an object capable to hold a bynary string value.

+
+
Returns:
+
+new binary object
+
+
+
+ + +
+

Date(year, + month, + day) +

+

Build an object holding a date value.

+
+
Returns:
+
+new date
+
+
+
+ + +
+

DateFromTicks(ticks) +

+

Build an object holding a date value from the given ticks value.

+

Ticks are the number of seconds since the epoch; see the documentation of the standard Python time module for details).

+
+
Returns:
+
+new date
+
+
+
+ + +
+

Time(hour, + minutes, + seconds, + tzinfo=None) +

+

Build an object holding a time value.

+
+
Returns:
+
+new time
+
+
+
+ + +
+

TimeFromTicks(ticks) +

+

Build an object holding a time value from the given ticks value.

+

Ticks are the number of seconds since the epoch; see the documentation of the standard Python time module for details).

+
+
Returns:
+
+new time
+
+
+
+ + +
+

Timestamp(year, + month, + day, + hour, + minutes, + seconds, + tzinfo=None) +

+

Build an object holding a timestamp value.

+
+
Returns:
+
+new timestamp
+
+
+
+ + +
+

TimestampFromTicks(ticks) +

+

Build an object holding a timestamp value from the given ticks value.

+

Ticks are the number of seconds since the epoch; see the documentation of the standard Python time module for details).

+
+
Returns:
+
+new timestamp
+
+
+
+
+ + + + + + + + + + + + + + + + + + +
+ +