Table of Contents

Class: ConnectionPool | Twisted-0.17.4/twisted/enterprise/adbapi.py
--- | ---

I represent a pool of connections to a DB-API 2.0 compliant database.

Base Classes |
--- | ---
pb.Referenceable

Methods |
--- | ---

__getstate__ __init__ __setstate__ _runInteraction _runOperation _runQuery close | connect interaction operation query runInteraction runOperation synchronousOperation

| __getstate__

    __getstate__ ( self )

| __init__

    __init__ (
            self,
            dbapiName,
            *connargs,
            *connkw,
            )

See ConnectionPool.__doc__

| __setstate__

    __setstate__ ( self,  state )

| _runInteraction

    _runInteraction (
            self,
            interaction,
            *args,
            *kw,
            )

| _runOperation

    _runOperation (
            self,
            args,
            kw,
            )

This is used for non-query operations that don't want "fetch*" to be called

| _runQuery

    _runQuery (
            self,
            args,
            kw,
            )

| close

    close ( self )

| connect

    connect ( self )

| interaction

    interaction (
            self,
            interaction,
            callback,
            errback,
            *args,
            *kw,
            )

### Interact with the database.

#### Arguments:

- interaction: a callable object whose first argument is an adbapi.Transaction.

- args and *kw: additional arguments to be passed to `interaction`

The callable object presented here will be executed in a pooled thread. `callback` will be made in the main thread upon success and `errback` will be called upon failure. If `callback` is called, that means that the transaction was committed; if `errback`, it was rolled back. This does not apply in databases which do not support transactions.

| operation

    operation (
            self,
            callback,
            errback,
            *args,
            *kw,
            )

| query

    query (
            self,
            callback,
            errback,
            *args,
            *kw,
            )

| runInteraction

    runInteraction (
            self,
            interaction,
            *args,
            *kw,
            )

| runOperation

    runOperation (
            self,
            *args,
            *kw,
            )

| synchronousOperation

    synchronousOperation (
            self,
            *args,
            *kw,
            )

Table of Contents

This document was automatically generated on Sat Apr 20 01:30:47 2002 by HappyDoc version 2.0