Package web2py :: Package gluon :: Module dal :: Class PostgreSQLAdapter |
[hide private]
[frames] | no frames]

# Class PostgreSQLAdapter

source code

        object --+
                 |
    ConnectionPool --+
                     |
           BaseAdapter --+
                         |
                        PostgreSQLAdapter

Known Subclasses:
  JDBCPostgreSQLAdapter

Instance Methods | [hide private]
sequence_name(self, table) | source code
RANDOM(self) | source code
distributed_transaction_begin(self, key) | source code
prepare(self, key) | source code
commit_prepared(self, key) | source code
rollback_prepared(self, key) | source code
create_sequence_and_triggers(self, query, table, **args) | source code
__init__(self, db, uri, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd6a9b0>, driver_args=`{``}`, adapter_args=`{``}`) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
lastrowid(self, table) | source code
LIKE(self, first, second) | source code
STARTSWITH(self, first, second) | source code
ENDSWITH(self, first, second) | source code
CONTAINS(self, first, second) | source code
Inherited from `BaseAdapter`: `ADD`, `AGGREGATE`, `ALLOW_NULL`, `AND`, `AS`, `BELONGS`, `COALESCE_ZERO`, `COMMA`, `DIV`, `EQ`, `EXTRACT`, `GE`, `GT`, `INVERT`, `JOIN`, `LE`, `LEFT_JOIN`, `LOWER`, `LT`, `MOD`, `MUL`, `NE`, `NOT`, `NOT_NULL`, `ON`, `OR`, `PRIMARY_KEY`, `SUB`, `SUBSTRING`, `UPPER`, `alias`, `bulk_insert`, `close`, `commit`, `concat_add`, `constraint_name`, `count`, `create_table`, `delete`, `drop`, `execute`, `expand`, `file_close`, `file_delete`, `file_exists`, `file_open`, `filter_tenant`, `get_table`, `insert`, `integrity_error`, `integrity_error_class`, `log_execute`, `migrate_table`, `parse`, `represent`, `represent_exceptions`, `rollback`, `rowslice`, `select`, `select_limitby`, `tables`, `trigger_name`, `truncate`, `update` Inherited from `BaseAdapter` (private): `_count`, `_delete`, `_drop`, `_insert`, `_select`, `_truncate`, `_update` Inherited from `ConnectionPool`: `find_or_make_work_folder`, `pool_connection` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Static Methods | [hide private]
Inherited from `ConnectionPool`: `close_all_instances`, `set_folder`

Class Variables | [hide private]
| driver A Python driver for PostgreSQL psycopg is a PostgreSQL_ database adapter for the Python_ programming language.
| support_distributed_transaction = `True`
| types = ``{``'``blob``'``:` `'``BYTEA``'``,` `'``boolean``'``:` `'``CHAR(1)``'``,` `'``date``'``:` `'``DATE``'``...``
Inherited from `BaseAdapter`: `commit_on_alter_table`, `maxcharlength`, `uploads_in_blob` Inherited from `ConnectionPool`: `pools`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### sequence_name(self, table) | source code
Overrides: BaseAdapter.sequence_name

### RANDOM(self) | source code
Overrides: BaseAdapter.RANDOM

### distributed_transaction_begin(self, key) | source code
Overrides: BaseAdapter.distributed_transaction_begin

### prepare(self, key) | source code
Overrides: BaseAdapter.prepare

### commit_prepared(self, key) | source code
Overrides: BaseAdapter.commit_prepared

### rollback_prepared(self, key) | source code
Overrides: BaseAdapter.rollback_prepared

### create_sequence_and_triggers(self, query, table, **args) | source code
Overrides: BaseAdapter.create_sequence_and_triggers

### __init__(self, db, uri, pool_size=0, folder=1, db_codec=`'``UTF-8``'`, credential_decoder=<function <lambda> at 0xd6a9b0>, driver_args=`{``}`, adapter_args=`{``}`) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: BaseAdapter.__init__

### lastrowid(self, table) | source code
Overrides: BaseAdapter.lastrowid

### LIKE(self, first, second) | source code
Overrides: BaseAdapter.LIKE

### STARTSWITH(self, first, second) | source code
Overrides: BaseAdapter.STARTSWITH

### ENDSWITH(self, first, second) | source code
Overrides: BaseAdapter.ENDSWITH

### CONTAINS(self, first, second) | source code
Overrides: BaseAdapter.CONTAINS

Class Variable Details | [hide private]

### driver
    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

    .. _PostgreSQL: http://www.postgresql.org/
    .. _Python: http://www.python.org/

    :Groups:
      * `Connections creation`: connect
      * `Value objects constructors`: Binary, Date, DateFromTicks, Time,
        TimeFromTicks, Timestamp, TimestampFromTicks
Value: psycopg2

  ### types Value:
      {'blob': 'BYTEA',
       'boolean': 'CHAR(1)',
       'date': 'DATE',
       'datetime': 'TIMESTAMP',
       'decimal': 'NUMERIC(%(precision)s,%(scale)s)',
       'double': 'FLOAT8',
       'id': 'SERIAL PRIMARY KEY',
       'integer': 'INTEGER',
      ...