1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-01 21:31:19 +03:00
Files
postgres/src/interfaces/libpq++/pgtransdb.cc
Bruce Momjian b14c99d8d6 Here it is. Remove or rename the current interfaces/libpq++ and untar
this file in interfaces/

It will all need to be checked in.  I used the char *rcsid[] method for
cvs ids so it can be strings | grep'd to find version numbers.  The new
version for the library is 3.0.

Run configure from src/ to create the Makefile and it should be good to
go.

I did minimal documentation references in the README, I'll see if I can
get something to Tom Lockhart rather quickly.

Vince.
1999-05-23 01:04:07 +00:00

50 lines
1.2 KiB
C++

/*-------------------------------------------------------------------------
*
* FILE
* pgtransdb.cpp
*
* DESCRIPTION
* implementation of the PgTransaction class.
* PgConnection encapsulates a transaction querying to backend
*
* Copyright (c) 1994, Regents of the University of California
*
*
*-------------------------------------------------------------------------
*/
#include "pgtransdb.h"
static char rcsid[] = "$Id: pgtransdb.cc,v 1.2 1999/05/23 01:04:03 momjian Exp $";
// ****************************************************************
//
// PgTransaction Implementation
//
// ****************************************************************
// Make a connection to the specified database with default environment
// See PQconnectdb() for conninfo usage.
PgTransaction::PgTransaction(const char* conninfo)
: PgDatabase(conninfo)
{
BeginTransaction();
}
// Destructor: End the transaction block
PgTransaction::~PgTransaction()
{
EndTransaction();
}
// Begin the transaction block
ExecStatusType PgTransaction::BeginTransaction()
{
return Exec("BEGIN");
} // End BeginTransaction()
// Begin the transaction block
ExecStatusType PgTransaction::EndTransaction()
{
return Exec("END");
} // End EndTransaction()