Postgres::beginDump PHP Method

beginDump() public method

Sets up the data object for a dump. eg. Starts the appropriate transaction, sets variables, etc.
public beginDump ( )
    function beginDump()
    {
        // Begin serializable transaction (to dump consistent data)
        $status = $this->beginTransaction();
        if ($status != 0) {
            return -1;
        }
        // Set serializable
        $sql = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE";
        $status = $this->execute($sql);
        if ($status != 0) {
            $this->rollbackTransaction();
            return -1;
        }
        // Set datestyle to ISO
        $sql = "SET DATESTYLE = ISO";
        $status = $this->execute($sql);
        if ($status != 0) {
            $this->rollbackTransaction();
            return -1;
        }
        // Set extra_float_digits to 2
        $sql = "SET extra_float_digits TO 2";
        $status = $this->execute($sql);
        if ($status != 0) {
            $this->rollbackTransaction();
            return -1;
        }
        return 0;
    }
Postgres