Changeset 1138

Show
Ignore:
Timestamp:
08/31/06 16:42:36 (4 years ago)
Author:
jtv
Message:

Big whitespace cleanup

Location:
trunk
Files:
103 modified

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r1137 r1138  
    77 include/pqxx/util.hxx, src/util.cxx: 
    88  - Factored reference-counting out of PQAlloc 
     9 *: 
     10  - Whitespace cleanup: spaces before tab 
     11  - Whitespace cleanup: whitespace before end-of-line 
    9122006-08-29  Jeroen T. Vermeulen <jtv@xs4all.nl> 
    1013 include/pqxx/connection_base.hxx, include/pqxx/transaction_base.hxx, 
  • trunk/README

    r1034 r1138  
    455455 
    456456DocConversion           http://docconversion.sourceforge.net/ 
    457 Genea                   http://savannah.nongnu.org/projects/genea/ 
     457Genea                   http://savannah.nongnu.org/projects/genea/ 
    458458Gnucomo                 http://www.gnucomo.org/ 
    459459MapServer               http://mapserver.gis.umn.edu/ 
     
    464464Confirmed by authors: 
    465465 
    466 OKE                     http://www.liacs.nl/home/bsamwel/oke/prerelease-0.10/ 
     466OKE                     http://www.liacs.nl/home/bsamwel/oke/prerelease-0.10/ 
    467467KOffice / Kexi          http://www.kexi-project.org/ 
    468468KPoGre                  http://kpogre.sourceforge.net/ 
  • trunk/configure.ac.in

    r1129 r1138  
    820820                        1, 
    821821                        [Define if <iterator> lacks an iterator template definition]) 
    822          it='no']) 
     822         it='no']) 
    823823AC_MSG_RESULT($it) 
    824824 
  • trunk/include/pqxx/basic_connection.hxx

    r1026 r1138  
    4343 * unacceptable code duplication. 
    4444 */ 
    45 template<typename CONNECTPOLICY> class basic_connection :  
     45template<typename CONNECTPOLICY> class basic_connection : 
    4646  public connection_base 
    4747{ 
    4848public: 
    49   basic_connection() :  
     49  basic_connection() : 
    5050    connection_base(m_policy), 
    5151    m_options(PGSTD::string()), 
  • trunk/include/pqxx/binarystring.hxx

    r1123 r1138  
    7979   * @param F the field to read; must be a bytea field 
    8080   */ 
    81   explicit binarystring(const result::field &F);                        //[t62] 
     81  explicit binarystring(const result::field &F);                        //[t62] 
    8282 
    8383  /// Size of converted string in bytes 
     
    9494 
    9595#ifdef PQXX_HAVE_REVERSE_ITERATOR 
    96   const_reverse_iterator rbegin() const                                 //[t62] 
    97         { return const_reverse_iterator(end()); } 
    98   const_reverse_iterator rend() const                                   //[t62] 
    99         { return const_reverse_iterator(begin()); } 
     96  const_reverse_iterator rbegin() const                                 //[t62] 
     97        { return const_reverse_iterator(end()); } 
     98  const_reverse_iterator rend() const                                   //[t62] 
     99        { return const_reverse_iterator(begin()); } 
    100100#endif 
    101101 
     
    103103  const value_type *data() const throw () {return super::c_ptr();}      //[t62] 
    104104 
    105   const_reference operator[](size_type i) const throw ()                //[t62] 
    106         { return data()[i]; } 
     105  const_reference operator[](size_type i) const throw ()                //[t62] 
     106        { return data()[i]; } 
    107107 
    108108  bool operator==(const binarystring &) const throw ();                 //[t62] 
    109109  bool operator!=(const binarystring &rhs) const throw ()               //[t62] 
    110         { return !operator==(rhs); } 
     110        { return !operator==(rhs); } 
    111111 
    112112  /// Index contained string, checking for valid index 
     
    120120   * a null character, you will not find one here. 
    121121   */ 
    122   const char *c_ptr() const throw ()                                    //[t62] 
     122  const char *c_ptr() const throw ()                                    //[t62] 
    123123  { 
    124124    return reinterpret_cast<char *>(super::c_ptr()); 
  • trunk/include/pqxx/cachedresult.h

    r968 r1138  
    6767  /** Perform query and transparently fetch and cache resulting data. 
    6868   * @param T is the transaction context in which the cachedresult lives.  This 
    69    *    will be used whenever data is fetched.  Must have isolation level 
    70    *    "serializable," otherwise a build error will be generated for the symbol 
    71    *    error_permitted_isolation_level. 
     69   *    will be used whenever data is fetched.  Must have isolation level 
     70   *    "serializable," otherwise a build error will be generated for the symbol 
     71   *    error_permitted_isolation_level. 
    7272   * @param Query is the SQL query that yields the desired result set. 
    7373   * @param BaseName gives the initial part of the name for this cachedresult 
    74    *    and the Cursor it uses to obtain its results. 
     74   *    and the Cursor it uses to obtain its results. 
    7575   * @param Granularity determines how large the blocks of data used internally 
    7676   * will be; must be at least 2. 
     
    103103   */ 
    104104  const tuple operator[](size_type i) const                             //[t41] 
    105         { return GetBlock(BlockFor(i))[Offset(i)]; } 
     105        { return GetBlock(BlockFor(i))[Offset(i)]; } 
    106106 
    107107  /// Access a tuple.  Throws exception if index is out of range. 
     
    118118   */ 
    119119   const tuple at(size_type i) const                                    //[t40] 
    120         { return GetBlock(BlockFor(i)).at(Offset(i)); } 
     120        { return GetBlock(BlockFor(i)).at(Offset(i)); } 
    121121 
    122122  /// Number of rows in result set.  First call may be slow. 
     
    141141 
    142142  blocknum BlockFor(size_type Row) const throw () 
    143         { return Row / m_Granularity; } 
     143        { return Row / m_Granularity; } 
    144144  size_type Offset(size_type Row) const throw () 
    145         { return Row % m_Granularity; } 
     145        { return Row % m_Granularity; } 
    146146  Cursor::size_type FirstRowOf(blocknum Block) const throw () 
    147         { return Block*m_Granularity; } 
     147        { return Block*m_Granularity; } 
    148148 
    149149  void MoveTo(blocknum) const; 
  • trunk/include/pqxx/connection.hxx

    r1123 r1138  
    2929 * @addtogroup connection Connection classes 
    3030 * 
    31  * Several types of connections are available, including plain connection and  
     31 * Several types of connections are available, including plain connection and 
    3232 * lazyconnection.  These types are typedefs combining a derivative of the 
    3333 * connection_base class (where essentially all connection-related functionality 
  • trunk/include/pqxx/connection_base.hxx

    r1133 r1138  
    184184   * the temp tables, you can permit it again to get the benefits of connection 
    185185   * reactivation for the remainder of the program. 
    186    *  
     186   * 
    187187   * @param inhibit should reactivation be inhibited from here on? 
    188188   * 
     
    196196   * you inhibit it. 
    197197   */ 
    198   void inhibit_reactivation(bool inhibit)                               //[t86] 
     198  void inhibit_reactivation(bool inhibit)                               //[t86] 
    199199        { m_inhibit_reactivation=inhibit; } 
    200200 
     
    249249 
    250250  /// Server port number we're connected to. 
    251   const char *port();                                                   //[t1] 
     251  const char *port();                                                   //[t1] 
    252252 
    253253  /// Process ID for backend process. 
     
    366366   */ 
    367367  void set_client_encoding(const PGSTD::string &Encoding)               //[t7] 
    368         { set_variable("CLIENT_ENCODING", Encoding); } 
     368        { set_variable("CLIENT_ENCODING", Encoding); } 
    369369 
    370370  /// Set session variable 
     
    386386   */ 
    387387  void set_variable(const PGSTD::string &Var, 
    388                     const PGSTD::string &Value);                        //[t60] 
     388                    const PGSTD::string &Value);                        //[t60] 
    389389 
    390390  /// Read session variable 
     
    405405  //@{ 
    406406  /// Check for pending trigger notifications and take appropriate action. 
    407   /**  
     407  /** 
    408408   * All notifications found pending at call time are processed by finding 
    409409   * any matching triggers and invoking those.  If no triggers matched the 
     
    489489   * void foo(connection_base &C) 
    490490   * { 
    491    *   C.prepare("findtable",  
     491   *   C.prepare("findtable", 
    492492   *             "select * from pg_tables where name=$1") 
    493493   *             ("varchar", treat_string); 
     
    537537 
    538538  /// Perform the transaction defined by a transactor-based object. 
    539   /**  
     539  /** 
    540540   * Invokes the given transactor, making at most Attempts attempts to perform 
    541541   * the encapsulated code.  If the code throws any exception other than 
     
    549549 
    550550  /// Perform the transaction defined by a transactor-based object. 
    551   /**  
     551  /** 
    552552   * @param T The transactor to be executed. 
    553553   */ 
     
    568568  /** 
    569569   * @name 1.x API 
    570    *  
     570   * 
    571571   * These are all deprecated; they were defined in the libpqxx 1.x API but are 
    572572   * no longer actively supported. 
     
    589589  /// @deprecated Use process_notice() instead 
    590590  void ProcessNotice(const PGSTD::string &msg) throw () PQXX_DEPRECATED 
    591         { return process_notice(msg); } 
     591        { return process_notice(msg); } 
    592592  /// @deprecated Use trace() instead 
    593593  void Trace(FILE *F) PQXX_DEPRECATED { trace(F); } 
     
    613613  /// @deprecated Use set_variable() instead 
    614614  void SetVariable(const PGSTD::string &Var, const PGSTD::string &Val) 
    615         PQXX_DEPRECATED { set_variable(Var, Val); } 
     615        PQXX_DEPRECATED { set_variable(Var, Val); } 
    616616 
    617617  /** 
  • trunk/include/pqxx/cursor.hxx

    r1137 r1138  
    240240template<> void 
    241241  cursor_base::check_displacement<cursor_base::forward_only>(difference_type) 
    242         const; 
     242        const; 
    243243#endif 
    244244 
     
    422422 
    423423  difference_type move_to(cursor_base::size_type to,                    //[t91] 
    424         cursor_base::difference_type &d) 
     424        cursor_base::difference_type &d) 
    425425        { return move(difference_type(to)-difference_type(pos()), d); } 
    426426private: 
     
    514514  icursorstream(transaction_base &Context, 
    515515      const result::field &Name, 
    516       difference_type Stride=1);                                        //[t84] 
     516      difference_type Stride=1);                                        //[t84] 
    517517 
    518518  /// Read new value into given result object; same as operator >> 
     
    593593class PQXX_LIBEXPORT icursor_iterator : 
    594594  public PGSTD::iterator<PGSTD::input_iterator_tag, 
    595         result, 
     595        result, 
    596596        cursor_base::size_type, 
    597597        const result *, 
     
    617617  bool operator==(const icursor_iterator &rhs) const;                   //[t84] 
    618618  bool operator!=(const icursor_iterator &rhs) const throw ()           //[t84] 
    619         { return !operator==(rhs); } 
     619        { return !operator==(rhs); } 
    620620  bool operator<(const icursor_iterator &rhs) const;                    //[t84] 
    621621  bool operator>(const icursor_iterator &rhs) const                     //[t84] 
  • trunk/include/pqxx/dbtransaction.hxx

    r1026 r1138  
    2626 
    2727/// Abstract base class responsible for bracketing a backend transaction 
    28 /**  
     28/** 
    2929 * @addtogroup transaction Transaction classes 
    3030 * 
     
    8484 
    8585  static PGSTD::string fullname(const PGSTD::string &ttype, 
    86         const PGSTD::string &isolation); 
     86        const PGSTD::string &isolation); 
    8787 
    8888private: 
  • trunk/include/pqxx/except.hxx

    r1123 r1138  
    117117        sql_error(err) {} 
    118118  integrity_constraint_violation(const PGSTD::string &err, 
    119         const PGSTD::string &Q) : 
     119        const PGSTD::string &Q) : 
    120120        sql_error(err, Q) {} 
    121121}; 
  • trunk/include/pqxx/largeobject.hxx

    r1036 r1138  
    9393  /// Compare object identities 
    9494  /** @warning Only valid between large objects in the same database. */ 
    95   bool operator==(const largeobject &other) const                       //[t51] 
     95  bool operator==(const largeobject &other) const                       //[t51] 
    9696          { return m_ID == other.m_ID; } 
    9797  /// Compare object identities 
    9898  /** @warning Only valid between large objects in the same database. */ 
    99   bool operator!=(const largeobject &other) const                       //[t51] 
     99  bool operator!=(const largeobject &other) const                       //[t51] 
    100100          { return m_ID != other.m_ID; } 
    101101  /// Compare object identities 
    102102  /** @warning Only valid between large objects in the same database. */ 
    103   bool operator<=(const largeobject &other) const                       //[t51] 
     103  bool operator<=(const largeobject &other) const                       //[t51] 
    104104          { return m_ID <= other.m_ID; } 
    105105  /// Compare object identities 
    106106  /** @warning Only valid between large objects in the same database. */ 
    107   bool operator>=(const largeobject &other) const                       //[t51] 
     107  bool operator>=(const largeobject &other) const                       //[t51] 
    108108          { return m_ID >= other.m_ID; } 
    109109  /// Compare object identities 
    110110  /** @warning Only valid between large objects in the same database. */ 
    111   bool operator<(const largeobject &other) const                        //[t51] 
     111  bool operator<(const largeobject &other) const                        //[t51] 
    112112          { return m_ID < other.m_ID; } 
    113113  /// Compare object identities 
    114114  /** @warning Only valid between large objects in the same database. */ 
    115   bool operator>(const largeobject &other) const                        //[t51] 
     115  bool operator>(const largeobject &other) const                        //[t51] 
    116116          { return m_ID > other.m_ID; } 
    117117  //@} 
     
    122122   * @param File A filename on the client's filesystem 
    123123   */ 
    124   void to_file(dbtransaction &T, const PGSTD::string &File) const;      //[t52] 
     124  void to_file(dbtransaction &T, const PGSTD::string &File) const;      //[t52] 
    125125 
    126126  /// Delete large object from database 
     
    224224   * @param File A filename on the client's filesystem 
    225225   */ 
    226   void to_file(const PGSTD::string &File) const                         //[t54] 
    227         { largeobject::to_file(m_Trans, File); } 
     226  void to_file(const PGSTD::string &File) const                         //[t54] 
     227        { largeobject::to_file(m_Trans, File); } 
    228228 
    229229#ifdef PQXX_BROKEN_USING_DECL 
     
    234234   */ 
    235235  void to_file(dbtransaction &T, const PGSTD::string &F) const 
    236         { largeobject::to_file(T, F); } 
     236        { largeobject::to_file(T, F); } 
    237237#else 
    238238  using largeobject::to_file; 
     
    255255   */ 
    256256  void write(const PGSTD::string &Buf)                                  //[t50] 
    257         { write(Buf.c_str(), static_cast<size_type>(Buf.size())); } 
     257        { write(Buf.c_str(), static_cast<size_type>(Buf.size())); } 
    258258 
    259259  /// Read data from large object 
     
    271271   */ 
    272272  size_type seek(size_type dest, seekdir dir);                          //[t51] 
    273          
     273 
    274274  /// Report current position in large object's data stream 
    275275  /** Throws an exception if an error occurs. 
     
    300300 
    301301  /// Write to large object's data stream 
    302   /** Does not throw exception in case of error; inspect return value and  
     302  /** Does not throw exception in case of error; inspect return value and 
    303303   * @c errno instead. 
    304304   * @param Buf Data to write 
     
    309309 
    310310  /// Read from large object's data stream 
    311   /** Does not throw exception in case of error; inspect return value and  
     311  /** Does not throw exception in case of error; inspect return value and 
    312312   * @c errno instead. 
    313313   * @param Buf Area where incoming bytes should be stored 
     
    316316   */ 
    317317  off_type cread(char Buf[], size_type Len) throw ();                   //[t50] 
    318    
     318 
    319319  /// Report current position in large object's data stream 
    320320  /** Does not throw exception in case of error; inspect return value and 
     
    345345  PGSTD::string PQXX_PRIVATE Reason(int err) const; 
    346346  internal::pq::PGconn *RawConnection() const 
    347         { return largeobject::RawConnection(m_Trans); } 
     347        { return largeobject::RawConnection(m_Trans); } 
    348348 
    349349  void open(openmode mode); 
     
    395395                        largeobject O, 
    396396                        openmode mode = PGSTD::ios::in | PGSTD::ios::out, 
    397                         size_type BufSize=512) :                        //[t48] 
     397                        size_type BufSize=512) :                        //[t48] 
    398398    m_BufSize(BufSize), 
    399399    m_Obj(T, O), 
    400400    m_G(0), 
    401401    m_P(0) 
    402         { initialize(mode); } 
     402        { initialize(mode); } 
    403403 
    404404  largeobject_streambuf(dbtransaction &T, 
    405405                        oid O, 
    406406                        openmode mode = PGSTD::ios::in | PGSTD::ios::out, 
    407                         size_type BufSize=512) :                        //[t48] 
     407                        size_type BufSize=512) :                        //[t48] 
    408408    m_BufSize(BufSize), 
    409409    m_Obj(T, O), 
    410410    m_G(0), 
    411411    m_P(0) 
    412         { initialize(mode); } 
     412        { initialize(mode); } 
    413413 
    414414  virtual ~largeobject_streambuf() throw () { delete [] m_P; delete [] m_G; } 
     
    535535    super(0), 
    536536    m_Buf(T, O, PGSTD::ios::in, BufSize) 
    537         { super::init(&m_Buf); } 
     537        { super::init(&m_Buf); } 
    538538 
    539539  /// Create a basic_ilostream 
     
    548548    super(0), 
    549549    m_Buf(T, O, PGSTD::ios::in, BufSize) 
    550         { super::init(&m_Buf); } 
     550        { super::init(&m_Buf); } 
    551551 
    552552private: 
     
    597597    super(0), 
    598598    m_Buf(T, O, PGSTD::ios::out, BufSize) 
    599         { super::init(&m_Buf); } 
     599        { super::init(&m_Buf); } 
    600600 
    601601  /// Create a basic_olostream 
     
    606606   */ 
    607607  basic_olostream(dbtransaction &T, 
    608                   oid O, 
     608                  oid O, 
    609609                  largeobject::size_type BufSize=512) :                 //[t57] 
    610610    super(0), 
    611611    m_Buf(T, O, PGSTD::ios::out, BufSize) 
    612         { super::init(&m_Buf); } 
     612        { super::init(&m_Buf); } 
    613613 
    614614  ~basic_olostream() 
     
    672672   */ 
    673673  basic_lostream(dbtransaction &T, 
    674                  largeobject O, 
     674                 largeobject O, 
    675675                 largeobject::size_type BufSize=512) :                  //[t59] 
    676676    super(0), 
    677677    m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize) 
    678         { super::init(&m_Buf); } 
     678        { super::init(&m_Buf); } 
    679679 
    680680  /// Create a basic_lostream 
     
    685685   */ 
    686686  basic_lostream(dbtransaction &T, 
    687                  oid O, 
     687                 oid O, 
    688688                 largeobject::size_type BufSize=512) :                  //[t59] 
    689689    super(0), 
    690690    m_Buf(T, O, PGSTD::ios::in | PGSTD::ios::out, BufSize) 
    691         { super::init(&m_Buf); } 
     691        { super::init(&m_Buf); } 
    692692 
    693693  ~basic_lostream() 
  • trunk/include/pqxx/pipeline.hxx

    r1119 r1138  
    103103   */ 
    104104  result retrieve(query_id qid)                                         //[t71] 
    105         { return retrieve(m_queries.find(qid)).second; } 
     105        { return retrieve(m_queries.find(qid)).second; } 
    106106 
    107107  /// Retrieve oldest unretrieved result (possibly wait for one) 
     
    123123   * @return Old retention capacity 
    124124   */ 
    125   int retain(int retain_max=2);                                         //[t70] 
     125  int retain(int retain_max=2);                                         //[t70] 
    126126 
    127127 
     
    167167 
    168168  bool have_pending() const throw () 
    169         { return m_issuedrange.second != m_issuedrange.first; } 
     169        { return m_issuedrange.second != m_issuedrange.first; } 
    170170 
    171171  void PQXX_PRIVATE issue(); 
  • trunk/include/pqxx/result.hxx

    r1134 r1138  
    7676   * 
    7777   * @code 
    78    *    cout << tuple["date"].c_str() << ": " << tuple["name"].c_str() << endl; 
     78   *    cout << tuple["date"].c_str() << ": " << tuple["name"].c_str() << endl; 
    7979   * @endcode 
    8080   * 
     
    245245     * @param C Column number of this field. 
    246246     */ 
    247     field(const tuple &T, tuple::size_type C) throw () :                //[t1] 
     247    field(const tuple &T, tuple::size_type C) throw () :                //[t1] 
    248248        m_tup(T), m_col(C) {} 
    249249 
     
    285285 
    286286    /// Column type 
    287     oid type() const { return home()->column_type(col()); }             //[t7] 
     287    oid type() const { return home()->column_type(col()); }             //[t7] 
    288288 
    289289    /// What table did this column come from?  Requires PostgreSQL 7.4 C API. 
     
    307307    /** Since the field's data is stored internally in the form of a 
    308308     * zero-terminated C string, this is the fastest way to read it.  Use the 
    309      * to() or as() functions to convert the string to other types such as  
     309     * to() or as() functions to convert the string to other types such as 
    310310     * @c int, or to C++ strings. 
    311311     */ 
     
    387387                           const tuple, 
    388388                           result::difference_type, 
    389                            const_iterator, 
    390                            tuple> const_iterator_base; 
     389                           const_iterator, 
     390                           tuple> 
     391        const_iterator_base; 
    391392 
    392393  /// Iterator for rows (tuples) in a query result set. 
     
    436437    const_iterator &operator--() { --m_Index; return *this; }           //[t12] 
    437438 
    438     const_iterator &operator+=(difference_type i)                       //[t12] 
     439    const_iterator &operator+=(difference_type i)                       //[t12] 
    439440        { m_Index+=i; return *this; } 
    440     const_iterator &operator-=(difference_type i)                       //[t12] 
     441    const_iterator &operator-=(difference_type i)                       //[t12] 
    441442        { m_Index-=i; return *this; } 
    442443    //@} 
     
    446447     */ 
    447448    //@{ 
    448     bool operator==(const const_iterator &i) const                      //[t12] 
     449    bool operator==(const const_iterator &i) const                      //[t12] 
    449450        {return m_Index==i.m_Index;} 
    450     bool operator!=(const const_iterator &i) const                      //[t12] 
     451    bool operator!=(const const_iterator &i) const                      //[t12] 
    451452        {return m_Index!=i.m_Index;} 
    452     bool operator<(const const_iterator &i) const                       //[t12] 
    453         {return m_Index<i.m_Index;} 
    454     bool operator<=(const const_iterator &i) const                      //[t12] 
     453    bool operator<(const const_iterator &i) const                       //[t12] 
     454        {return m_Index<i.m_Index;} 
     455    bool operator<=(const const_iterator &i) const                      //[t12] 
    455456        {return m_Index<=i.m_Index;} 
    456     bool operator>(const const_iterator &i) const                       //[t12] 
     457    bool operator>(const const_iterator &i) const                       //[t12] 
    457458        {return m_Index>i.m_Index;} 
    458     bool operator>=(const const_iterator &i) const                      //[t12] 
     459    bool operator>=(const const_iterator &i) const                      //[t12] 
    459460        {return m_Index>=i.m_Index;} 
    460461    //@} 
     
    474475    friend class pqxx::result; 
    475476    const_iterator(const pqxx::result *r, result::size_type i) throw () : 
    476         tuple(r, i) {} 
     477        tuple(r, i) {} 
    477478  }; 
    478479 
     
    496497    const_reverse_iterator(const const_reverse_iterator &rhs) :         //[t75] 
    497498      const_iterator(rhs) {} 
    498     explicit const_reverse_iterator(const const_iterator &rhs) :        //[t75] 
     499    explicit const_reverse_iterator(const const_iterator &rhs) :        //[t75] 
    499500      const_iterator(rhs) { super::operator--(); } 
    500501 
     
    505506     */ 
    506507    //@{ 
    507     using const_iterator::operator->;                                   //[t75] 
     508    using const_iterator::operator->;                                   //[t75] 
    508509    using const_iterator::operator*;                                    //[t75] 
    509510    //@} 
    510   
     511 
    511512    /** 
    512513     * @name Manipulations 
     
    518519        { iterator_type::operator--(); return *this; } 
    519520    const_reverse_iterator operator++(int);                             //[t75] 
    520     const_reverse_iterator &operator--()                                //[t75] 
     521    const_reverse_iterator &operator--()                                //[t75] 
    521522        { iterator_type::operator++(); return *this; } 
    522523    const_reverse_iterator operator--(int);                             //[t75] 
     
    548549        { return !operator==(rhs); } 
    549550 
    550     bool operator<(const const_reverse_iterator &rhs) const             //[t75] 
     551    bool operator<(const const_reverse_iterator &rhs) const             //[t75] 
    551552        { return iterator_type::operator>(rhs); } 
    552     bool operator<=(const const_reverse_iterator &rhs) const            //[t75] 
     553    bool operator<=(const const_reverse_iterator &rhs) const            //[t75] 
    553554        { return iterator_type::operator>=(rhs); } 
    554     bool operator>(const const_reverse_iterator &rhs) const             //[t75] 
     555    bool operator>(const const_reverse_iterator &rhs) const             //[t75] 
    555556        { return iterator_type::operator<(rhs); } 
    556     bool operator>=(const const_reverse_iterator &rhs) const            //[t75] 
     557    bool operator>=(const const_reverse_iterator &rhs) const            //[t75] 
    557558        { return iterator_type::operator<=(rhs); } 
    558559    //@} 
     
    566567  { 
    567568    typedef PGSTD::iterator<PGSTD::random_access_iterator_tag, 
    568                                   const field, 
     569                                  const field, 
    569570                                  tuple::size_type> it; 
    570571  public: 
     
    595596    const_fielditerator &operator--() { --m_col; return *this; }        //[t82] 
    596597 
    597     const_fielditerator &operator+=(difference_type i)                  //[t82] 
     598    const_fielditerator &operator+=(difference_type i)                  //[t82] 
    598599        { m_col+=i; return *this; } 
    599     const_fielditerator &operator-=(difference_type i)                  //[t82] 
     600    const_fielditerator &operator-=(difference_type i)                  //[t82] 
    600601        { m_col-=i; return *this; } 
    601602    //@} 
     
    605606     */ 
    606607    //@{ 
    607     bool operator==(const const_fielditerator &i) const                 //[t82] 
     608    bool operator==(const const_fielditerator &i) const                 //[t82] 
    608609        {return col()==i.col();} 
    609     bool operator!=(const const_fielditerator &i) const                 //[t82] 
     610    bool operator!=(const const_fielditerator &i) const                 //[t82] 
    610611        {return col()!=i.col();} 
    611     bool operator<(const const_fielditerator &i) const                  //[t82] 
    612         {return col()<i.col();} 
    613     bool operator<=(const const_fielditerator &i) const                 //[t82] 
     612    bool operator<(const const_fielditerator &i) const                  //[t82] 
     613        {return col()<i.col();} 
     614    bool operator<=(const const_fielditerator &i) const                 //[t82] 
    614615        {return col()<=i.col();} 
    615     bool operator>(const const_fielditerator &i) const                  //[t82] 
     616    bool operator>(const const_fielditerator &i) const                  //[t82] 
    616617        {return col()>i.col();} 
    617     bool operator>=(const const_fielditerator &i) const                 //[t82] 
     618    bool operator>=(const const_fielditerator &i) const                 //[t82] 
    618619        {return col()>=i.col();} 
    619620    //@} 
     
    626627 
    627628    friend const_fielditerator operator+(difference_type, 
    628                                           const_fielditerator);         //[t82] 
     629                                          const_fielditerator);         //[t82] 
    629630 
    630631    inline const_fielditerator operator-(difference_type) const;        //[t82] 
     
    676677        { iterator_type::operator--(); return *this; } 
    677678    const_reverse_fielditerator operator++(int);                        //[t82] 
    678     const_reverse_fielditerator &operator--()                           //[t82] 
     679    const_reverse_fielditerator &operator--()                           //[t82] 
    679680        { iterator_type::operator++(); return *this; } 
    680681    const_reverse_fielditerator operator--(int);                        //[t82] 
     
    709710        { return !operator==(rhs); } 
    710711 
    711     bool operator<(const const_reverse_fielditerator &rhs) const        //[t82] 
     712    bool operator<(const const_reverse_fielditerator &rhs) const        //[t82] 
    712713        { return iterator_type::operator>(rhs); } 
    713     bool operator<=(const const_reverse_fielditerator &rhs) const       //[t82] 
     714    bool operator<=(const const_reverse_fielditerator &rhs) const       //[t82] 
    714715        { return iterator_type::operator>=(rhs); } 
    715     bool operator>(const const_reverse_fielditerator &rhs) const        //[t82] 
     716    bool operator>(const const_reverse_fielditerator &rhs) const        //[t82] 
    716717        { return iterator_type::operator<(rhs); } 
    717     bool operator>=(const const_reverse_fielditerator &rhs) const       //[t82] 
     718    bool operator>=(const const_reverse_fielditerator &rhs) const       //[t82] 
    718719        { return iterator_type::operator<=(rhs); } 
    719720    //@} 
     
    725726 
    726727  result &operator=(const result &rhs) throw ()                         //[t10] 
    727         { super::operator=(rhs); return *this; } 
     728        { super::operator=(rhs); return *this; } 
    728729 
    729730  /** 
     
    733734  bool operator==(const result &) const throw ();                       //[t70] 
    734735  bool operator!=(const result &rhs) const throw ()                     //[t70] 
    735         { return !operator==(rhs); } 
     736        { return !operator==(rhs); } 
    736737  //@} 
    737738 
    738   const_reverse_iterator rbegin() const                                 //[t75] 
    739         { return const_reverse_iterator(end()); } 
     739  const_reverse_iterator rbegin() const                                 //[t75] 
     740        { return const_reverse_iterator(end()); } 
    740741  const_reverse_iterator rend() const                                   //[t75] 
    741         { return const_reverse_iterator(begin()); } 
     742        { return const_reverse_iterator(begin()); } 
    742743 
    743744  const_iterator begin() const throw ()                                 //[t1] 
    744         { return const_iterator(this, 0); } 
     745        { return const_iterator(this, 0); } 
    745746  inline const_iterator end() const throw ();                           //[t1] 
    746747 
     
    754755  void swap(result &) throw ();                                         //[t77] 
    755756 
    756   const tuple operator[](size_type i) const throw ()                    //[t2] 
    757         { return tuple(this, i); } 
     757  const tuple operator[](size_type i) const throw ()                    //[t2] 
     758        { return tuple(this, i); } 
    758759  const tuple at(size_type) const throw (PGSTD::out_of_range);          //[t10] 
    759760 
     
    765766  //@{ 
    766767  /// Number of columns in result 
    767   tuple::size_type columns() const throw ();                            //[t11] 
     768  tuple::size_type columns() const throw ();                            //[t11] 
    768769 
    769770  /// Number of given column (throws exception if it doesn't exist) 
     
    772773  /// Number of given column (throws exception if it doesn't exist) 
    773774  tuple::size_type column_number(const PGSTD::string &Name) const       //[t11] 
    774         {return column_number(Name.c_str());} 
     775        {return column_number(Name.c_str());} 
    775776 
    776777  /// Name of column with this number (throws exception if it doesn't exist) 
     
    781782  /// Type of given column 
    782783  oid column_type(int ColNum) const                                     //[t7] 
    783         { return column_type(tuple::size_type(ColNum)); } 
     784        { return column_type(tuple::size_type(ColNum)); } 
    784785 
    785786  /// Type of given column 
    786787  oid column_type(const PGSTD::string &ColName) const                   //[t7] 
    787         { return column_type(column_number(ColName)); } 
     788        { return column_type(column_number(ColName)); } 
    788789 
    789790  /// Type of given column 
    790791  oid column_type(const char ColName[]) const                           //[t7] 
    791         { return column_type(column_number(ColName)); } 
     792        { return column_type(column_number(ColName)); } 
    792793 
    793794  /// What table did this column come from?  Requires PostgreSQL 7.4 C API. 
     
    810811   */ 
    811812  oid column_table(int ColNum) const                                    //[t2] 
    812         { return column_table(tuple::size_type(ColNum)); } 
     813        { return column_table(tuple::size_type(ColNum)); } 
    813814 
    814815  /// What table did this column come from?  Requires PostgreSQL 7.4 C API. 
     
    821822   */ 
    822823  oid column_table(const PGSTD::string &ColName) const                  //[t2] 
    823         { return column_table(column_number(ColName)); } 
     824        { return column_table(column_number(ColName)); } 
    824825  //@} 
    825826 
     
    858859  /// @deprecated Use column_number() instead 
    859860  tuple::size_type ColumnNumber(const PGSTD::string &Name) const PQXX_DEPRECATED 
    860         {return column_number(Name);} 
     861        {return column_number(Name);} 
    861862  /// @deprecated Use column_name() instead 
    862863  const char *ColumnName(tuple::size_type Number) const PQXX_DEPRECATED 
    863         {return column_name(Number);} 
     864        {return column_name(Number);} 
    864865  //@} 
    865866#endif 
     
    876877  explicit result(internal::pq::PGresult *rhs) throw () : super(rhs) {} 
    877878  result &operator=(internal::pq::PGresult *rhs) throw () 
    878         { super::operator=(rhs); return *this; } 
     879        { super::operator=(rhs); return *this; } 
    879880  bool operator!() const throw () { return !c_ptr(); } 
    880881  operator bool() const throw () { return c_ptr() != 0; } 
     
    10271028  typedef PGSTD::ios::seekdir seekdir; 
    10281029 
    1029   explicit field_streambuf(const result::field &F) :                    //[t74] 
     1030  explicit field_streambuf(const result::field &F) :                    //[t74] 
    10301031    m_Field(F) 
    10311032  { 
  • trunk/include/pqxx/robusttransaction.hxx

    r1123 r1138  
    148148    namedclass(fullname("robusttransaction",isolation_tag::name()), Name), 
    149149    basic_robusttransaction(C, isolation_tag::name()) 
    150         { Begin(); } 
     150        { Begin(); } 
    151151 
    152152  virtual ~robusttransaction() throw () 
  • trunk/include/pqxx/tablereader.hxx

    r1062 r1138  
    9898  /// @deprecated Use tokenize<>() instead 
    9999  template<typename TUPLE> void Tokenize(PGSTD::string L, TUPLE &T) const 
    100         PQXX_DEPRECATED { tokenize(L, T); } 
     100        PQXX_DEPRECATED { tokenize(L, T); } 
    101101#endif 
    102102 
  • trunk/include/pqxx/tablewriter.hxx

    r1062 r1138  
    9696  /// @deprecated Use generate() instead 
    9797  template<typename IT> PGSTD::string ezinekoT(IT Begin, IT End) const 
    98         PQXX_DEPRECATED { return generate(Begin, End); } 
     98        PQXX_DEPRECATED { return generate(Begin, End); } 
    9999  /// @deprecated Use generate() instead 
    100100  template<typename TUPLE> PGSTD::string ezinekoT(const TUPLE &T) const 
    101         PQXX_DEPRECATED { return generate(T); } 
     101        PQXX_DEPRECATED { return generate(T); } 
    102102#endif 
    103103 
     
    130130 
    131131  back_insert_iterator & 
    132     operator=(const back_insert_iterator &rhs) throw ()                 //[t83] 
     132    operator=(const back_insert_iterator &rhs) throw ()                 //[t83] 
    133133  { 
    134134    m_Writer = rhs.m_Writer; 
  • trunk/include/pqxx/transaction.hxx

    r1026 r1138  
    9191    namedclass(fullname("transaction",isolation_tag::name()), TName), 
    9292    basic_transaction(C, isolation_tag::name()) 
    93         { Begin(); } 
     93        { Begin(); } 
    9494 
    9595  explicit transaction(connection_base &C) :                            //[t1] 
    9696    namedclass(fullname("transaction",isolation_tag::name())), 
    9797    basic_transaction(C, isolation_tag::name()) 
    98         { Begin(); } 
     98        { Begin(); } 
    9999 
    100100  virtual ~transaction() throw () 
  • trunk/include/pqxx/transaction_base.hxx

    r1133 r1138  
    7979 
    8080/// Interface definition (and common code) for "transaction" classes. 
    81 /**  
     81/** 
    8282 * @addtogroup transaction Transaction classes 
    8383 * All database access must be channeled through one of these classes for 
     
    155155   */ 
    156156  result exec(const char Query[], 
    157               const PGSTD::string &Desc=PGSTD::string());               //[t1] 
     157              const PGSTD::string &Desc=PGSTD::string());               //[t1] 
    158158 
    159159  /// Execute query 
     
    167167   */ 
    168168  result exec(const PGSTD::string &Query, 
    169               const PGSTD::string &Desc=PGSTD::string())                //[t2] 
    170         { return exec(Query.c_str(), Desc); } 
     169              const PGSTD::string &Desc=PGSTD::string())                //[t2] 
     170        { return exec(Query.c_str(), Desc); } 
    171171 
    172172  result exec(const PGSTD::stringstream &Query, 
    173               const PGSTD::string &Desc=PGSTD::string())                //[t9] 
    174         { return exec(Query.str(), Desc); } 
     173              const PGSTD::string &Desc=PGSTD::string())                //[t9] 
     174        { return exec(Query.str(), Desc); } 
    175175 
    176176  /** 
     
    222222  //@{ 
    223223  /// Have connection process warning message 
    224   void process_notice(const char Msg[]) const                           //[t14] 
    225         { m_Conn.process_notice(Msg); } 
     224  void process_notice(const char Msg[]) const                           //[t14] 
     225        { m_Conn.process_notice(Msg); } 
    226226  /// Have connection process warning message 
    227227  void process_notice(const PGSTD::string &Msg) const                   //[t14] 
    228         { m_Conn.process_notice(Msg); } 
     228        { m_Conn.process_notice(Msg); } 
    229229  //@} 
    230230 
     
    269269  /// @deprecated Use exec() instead 
    270270  result Exec(const PGSTD::string &Q, const PGSTD::string &D=PGSTD::string()) 
    271         PQXX_DEPRECATED { return exec(Q,D); } 
     271        PQXX_DEPRECATED { return exec(Q,D); } 
    272272  /// @deprecated Use process_notice() instead 
    273273  void ProcessNotice(const char M[]) const PQXX_DEPRECATED 
     
    282282  /// @deprecated Use set_variable() instead 
    283283  void SetVariable(const PGSTD::string &Var, const PGSTD::string &Val) 
    284         PQXX_DEPRECATED { set_variable(Var,Val); } 
     284        PQXX_DEPRECATED { set_variable(Var,Val); } 
    285285  //@} 
    286286#endif 
     
    377377  friend class tablewriter; 
    378378  void PQXX_PRIVATE BeginCopyWrite(const PGSTD::string &Table, 
    379         const PGSTD::string &Columns = PGSTD::string()); 
     379        const PGSTD::string &Columns = PGSTD::string()); 
    380380  void WriteCopyLine(const PGSTD::string &L) { m_Conn.WriteCopyLine(L); } 
    381381  void EndCopyWrite() { m_Conn.EndCopyWrite(); } 
     
    389389  friend class prepare::invocation; 
    390390  result prepared_exec(const PGSTD::string &, 
    391         const char *const[], 
     391        const char *const[], 
    392392        const int[], 
    393393        int); 
  • trunk/include/pqxx/trigger.hxx

    r1115 r1138  
    6262   * @param N A name for the trigger. 
    6363   */ 
    64   trigger(connection_base &C, const PGSTD::string &N) :                 //[t4] 
     64  trigger(connection_base &C, const PGSTD::string &N) :                 //[t4] 
    6565    m_Conn(C), m_Name(N) { m_Conn.AddTrigger(this); } 
    6666 
    67   virtual ~trigger() throw ()                                           //[t4] 
     67  virtual ~trigger() throw ()                                           //[t4] 
    6868  { 
    6969#ifdef PQXX_QUIET_DESTRUCTORS 
  • trunk/include/pqxx/util.hxx

    r1136 r1138  
    4646 
    4747/** @page threading Thread safety 
    48  *  
     48 * 
    4949 * This library does not contain any locking code to protect objects against 
    5050 * simultaneous modification in multi-threaded programs.  Therefore it is up to 
     
    189189template<> 
    190190  inline void from_string(const char Str[], PGSTD::stringstream &Obj)   //[t0] 
    191         { Obj.clear(); Obj << Str; } 
     191        { Obj.clear(); Obj << Str; } 
    192192 
    193193template<typename T> 
    194   inline void from_string(const PGSTD::string &Str, T &Obj)             //[t45] 
     194  inline void from_string(const PGSTD::string &Str, T &Obj)             //[t45] 
    195195        { from_string(Str.c_str(), Obj); } 
    196196 
    197197template<typename T> 
    198198  inline void from_string(const PGSTD::stringstream &Str, T &Obj)       //[t0] 
    199         { from_string(Str.str(), Obj); } 
     199        { from_string(Str.str(), Obj); } 
    200200 
    201201template<> inline void 
    202 from_string(const PGSTD::string &Str, PGSTD::string &Obj)               //[t46] 
     202from_string(const PGSTD::string &Str, PGSTD::string &Obj)               //[t46] 
    203203        { Obj = Str; } 
    204204 
     
    255255#endif 
    256256 
    257 inline PGSTD::string to_string(const char Obj[])                        //[t14] 
     257inline PGSTD::string to_string(const char Obj[])                        //[t14] 
    258258        { return PGSTD::string(Obj); } 
    259259 
     
    303303  /// Create items list with one element 
    304304  explicit items(const T &t) : CONT() { push_back(t); }                 //[t0] 
    305   items(const T &t1, const T &t2) : CONT()                              //[t80] 
    306         { push_back(t1); push_back(t2); } 
    307   items(const T &t1, const T &t2, const T &t3) : CONT()                 //[t0] 
    308         { push_back(t1); push_back(t2); push_back(t3); } 
    309   items(const T &t1, const T &t2, const T &t3, const T &t4) : CONT()    //[t0] 
    310         { push_back(t1); push_back(t2); push_back(t3); push_back(t4); } 
    311   items(const T&t1,const T&t2,const T&t3,const T&t4,const T&t5):CONT()  //[t0] 
    312         {push_back(t1);push_back(t2);push_back(t3);push_back(t4);push_back(t5);} 
     305  items(const T &t1, const T &t2) : CONT()                              //[t80] 
     306        { push_back(t1); push_back(t2); } 
     307  items(const T &t1, const T &t2, const T &t3) : CONT()                 //[t0] 
     308        { push_back(t1); push_back(t2); push_back(t3); } 
     309  items(const T &t1, const T &t2, const T &t3, const T &t4) : CONT()    //[t0] 
     310        { push_back(t1); push_back(t2); push_back(t3); push_back(t4); } 
     311  items(const T&t1,const T&t2,const T&t3,const T&t4,const T&t5):CONT()  //[t0] 
     312        {push_back(t1);push_back(t2);push_back(t3);push_back(t4);push_back(t5);} 
    313313  /// Copy container 
    314314  items(const CONT &c) : CONT(c) {}                                     //[t0] 
     
    512512 */ 
    513513void PQXX_LIBEXPORT FromString_ucharptr(const char Str[], 
    514         const unsigned char *&Obj) 
     514        const unsigned char *&Obj) 
    515515  PQXX_DEPRECATED; 
    516516 
    517517/// For libpqxx internal use only: quote std::string 
    518518PGSTD::string PQXX_LIBEXPORT Quote_string(const PGSTD::string &Obj, 
    519         bool EmptyIsNull); 
     519        bool EmptyIsNull); 
    520520 
    521521/// For libpqxx internal use only: quote const char * 
     
    559559 * 
    560560 * @code 
    561  *      TX.exec("SELECT number,amount " 
    562  *              "FROM accounts " 
    563  *              "WHERE allowed_to_see('" + userid + "','" + password + "')"); 
     561 *      TX.exec("SELECT number,amount " 
     562 *              "FROM accounts " 
     563 *              "WHERE allowed_to_see('" + userid + "','" + password + "')"); 
    564564 * @endcode 
    565565 * 
     
    572572 * 
    573573 * @code 
    574  *      'x') OR ('x' = 'x 
     574 *      'x') OR ('x' = 'x 
    575575 * @endcode 
    576576 * 
     
    579579 * 
    580580 * @code 
    581  *      SELECT number,amount 
    582  *      FROM accounts 
    583  *      WHERE allowed_to_see('user','x') OR ('x' = 'x') 
     581 *      SELECT number,amount 
     582 *      FROM accounts 
     583 *      WHERE allowed_to_see('user','x') OR ('x' = 'x') 
    584584 * @endcode 
    585585 * 
     
    592592 * 
    593593 * @code 
    594  *      TX.exec("SELECT number,amount " 
    595  *              "FROM accounts " 
    596  *              "WHERE allowed_to_see('" + TX.esc(userid) + "', " 
    597  *                      "'" + TX.esc(password) + "')"); 
     594 *      TX.exec("SELECT number,amount " 
     595 *              "FROM accounts " 
     596 *              "WHERE allowed_to_see('" + TX.esc(userid) + "', " 
     597 *                      "'" + TX.esc(password) + "')"); 
    598598 * @endcode 
    599599 * 
     
    602602 * 
    603603 * @code 
    604  *      SELECT number,amount 
    605  *      FROM accounts 
    606  *      WHERE allowed_to_see('user', 'x'') OR (''x'' = ''x') 
     604 *      SELECT number,amount 
     605 *      FROM accounts 
     606 *      WHERE allowed_to_see('user', 'x'') OR (''x'' = ''x') 
    607607 * @endcode 
    608608 * 
     
    692692 */ 
    693693template<int LEN> inline PGSTD::string Quote(const char (&Obj)[LEN], 
    694                                              bool EmptyIsNull) 
     694                                             bool EmptyIsNull) 
    695695  PQXX_DEPRECATED 
    696696{ 
     
    772772  ~PQAlloc() throw () { loseref(); } 
    773773 
    774   PQAlloc &operator=(const PQAlloc &rhs) throw () 
    775         { redoref(rhs); return *this; } 
     774  PQAlloc &operator=(const PQAlloc &rhs) throw () {redoref(rhs); return *this;} 
    776775 
    777776  /// Assume ownership of a pointer 
  • trunk/pqxx-config.in

    r1110 r1138  
    6666        deprecated "\"$pkgconfig --cflags libpqxx\"" 
    6767        $pkgconfig --cflags libpqxx 
    68         ;; 
     68        ;; 
    6969 
    7070    --libs) 
    7171        deprecated "\"$pkgconfig --libs libpqxx\"" 
    7272        $pkgconfig --libs libpqxx 
    73         ;; 
     73        ;; 
    7474 
    7575    *) 
  • trunk/src/connection_base.cxx

    r1135 r1138  
    590590    { 
    591591      // Erase first; otherwise a notification for the same trigger may yet come 
    592       // in and wreak havoc.  Thanks Dragan Milenkovic.  
     592      // in and wreak havoc.  Thanks Dragan Milenkovic. 
    593593      m_Triggers.erase(i); 
    594594 
     
    766766{ 
    767767  if (!in) return "null"; 
    768    
     768 
    769769  switch (treatment) 
    770770  { 
     
    861861      P << '(' 
    862862        << separated_list(",", 
    863                 s.parameters.begin(), 
     863                s.parameters.begin(), 
    864864                s.parameters.end(), 
    865865                prepare::internal::get_sqltype()) 
     
    879879 
    880880  result r(PQexecPrepared(m_Conn, 
    881         statement.c_str(), 
     881        statement.c_str(), 
    882882        nparams, 
    883883        params, 
     
    910910      const string key = "$" + to_string(n+1), 
    911911                   val = escape_param(params[n], 
    912                                 paramlengths[n], 
     912                                paramlengths[n], 
    913913                                s.parameters[n].treatment); 
    914914      const string::size_type keysz = key.size(); 
  • trunk/src/cursor.cxx

    r1137 r1138  
    3131/// Compute actual displacement based on requested and reported displacements 
    3232pqxx::cursor_base::difference_type adjust( 
    33     pqxx::cursor_base::difference_type d,  
     33    pqxx::cursor_base::difference_type d, 
    3434    pqxx::cursor_base::difference_type r) 
    3535{ 
     
    171171{ 
    172172  result r; 
    173   if (n)  
     173  if (n) 
    174174  { 
    175175    // We cache the last-executed fetch query.  If the current fetch uses the 
  • trunk/src/largeobject.cxx

    r1119 r1138  
    157157 
    158158pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, 
    159                                            oid O, 
     159                                           oid O, 
    160160                                           openmode mode) : 
    161161  largeobject(O), 
     
    168168 
    169169pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, 
    170                                            largeobject O, 
     170                                           largeobject O, 
    171171                                           openmode mode) : 
    172172  largeobject(O), 
  • trunk/src/tablereader.cxx

    r1119 r1138  
    175175            if (!is_octalchar(n1) || !is_octalchar(n2)) 
    176176              throw runtime_error("Invalid octal in encoded table stream"); 
    177             R += char((digit_to_number(n)<<6) |  
    178                 (digit_to_number(n1)<<3) |  
     177            R += char((digit_to_number(n)<<6) | 
     178                (digit_to_number(n1)<<3) | 
    179179                digit_to_number(n2)); 
    180180          } 
    181181          break; 
    182182 
    183         case 'b': 
     183        case 'b': 
    184184          // TODO: Escape code? 
    185185          R += char(8); 
    186186          break;        // Backspace 
    187         case 'v': 
     187        case 'v': 
    188188          // TODO: Escape code? 
    189189          R += char(11); 
    190190          break;        // Vertical tab 
    191         case 'f': 
     191        case 'f': 
    192192          // TODO: Escape code? 
    193193          R += char(12); 
    194194          break;        // Form feed 
    195         case 'n': 
     195        case 'n': 
    196196          R += '\n'; 
    197197          break;        // Newline 
    198         case 't': 
     198        case 't': 
    199199          R += '\t'; 
    200200          break;        // Tab 
    201         case 'r': 
     201        case 'r': 
    202202          R += '\r'; 
    203203          break;        // Carriage return; 
  • trunk/src/transaction_base.cxx

    r1133 r1138  
    210210 
    211211pqxx::result pqxx::transaction_base::exec(const char Query[], 
    212                                           const PGSTD::string &Desc) 
     212                                          const PGSTD::string &Desc) 
    213213{ 
    214214  CheckPendingError(); 
  • trunk/src/util.cxx

    r1136 r1138  
    110110    if (Str[i] != '-') 
    111111      throw runtime_error("Could not convert string to integer: '" + 
    112         string(Str) + "'"); 
     112        string(Str) + "'"); 
    113113 
    114114    for (++i; isdigit(Str[i]); ++i) 
     
    143143  if (!isdigit(Str[i])) 
    144144    throw runtime_error("Could not convert string to unsigned integer: '" + 
    145         string(Str) + "'"); 
     145        string(Str) + "'"); 
    146146 
    147147  for (result=0; isdigit(Str[i]); ++i) 
     
    352352{ 
    353353    // TODO: Is this workaround for missing isnan() reliable?  Infinities? 
    354   return  
     354  return 
    355355#if defined(PQXX_HAVE_ISNAN) 
    356356    isnan(Obj); 
     
    666666    if (!New) 
    667667      throw logic_error("Expected to close " + Old->description() + ", " 
    668                         "but got NULL pointer instead"); 
     668                        "but got NULL pointer instead"); 
    669669    if (!Old) 
    670670      throw logic_error("Closed while not open: " + New->description()); 
  • trunk/test/test001.cxx

    r1130 r1138  
    3737    { 
    3838      // Dump tuple number and column 0 value to cout.  Read the value using 
    39       // as(), which converts the field to the same type as the default value  
     39      // as(), which converts the field to the same type as the default value 
    4040      // you give it (or returns the default value if the field is null). 
    4141      cout << '\t' << to_string(c.num()) << '\t' << c[0].as(string()) << endl; 
  • trunk/test/test002.cxx

    r1069 r1138  
    6161    T.commit(); 
    6262 
    63     // Since we don't need the database anymore, we can be even more  
     63    // Since we don't need the database anymore, we can be even more 
    6464    // considerate and close the connection now.  This is optional. 
    6565    C.disconnect(); 
     
    7777      throw logic_error("Field " + rcol + " comes from " 
    7878                        "'" + to_string(rtable) + "', " 
    79                         "but by name, result says it's from " 
     79                        "but by name, result says it's from " 
    8080                        "'" + to_string(crtable) + "'"); 
    8181#endif 
     
    9898        throw logic_error("Tuple says field comes from " 
    9999                          "'" + to_string(ttable) + "'; " 
    100                           "expected '" + to_string(rtable) + "'"); 
     100                          "expected '" + to_string(rtable) + "'"); 
    101101      const oid cttable = R[i].column_table(rcol); 
    102102      if (cttable != rtable) 
    103103        throw logic_error("Field comes from '" + to_string(rtable) + "', " 
    104                           "but by name, tuple says it's from '" +  
     104                          "but by name, tuple says it's from '" + 
    105105                          to_string(cttable) + "'"); 
    106106#endif 
  • trunk/test/test003.cxx

    r898 r1138  
    5757      if (!Cur) throw logic_error("Inconsistent cursor state!"); 
    5858 
    59       // Received a block of rows.  Note that this may be less than the  
     59      // Received a block of rows.  Note that this may be less than the 
    6060      // blocksize we requested if we're at the end of our query. 
    6161      cout << "* Got " << R.size() << " row(s) *" << endl; 
  • trunk/test/test004.cxx

    r1040 r1138  
    5959 
    6060public: 
    61   explicit Notify(string TrigName) :  
     61  explicit Notify(string TrigName) : 
    6262    transactor<>("Notifier"), m_Trigger(TrigName) { } 
    6363 
     
    9999    { 
    100100      if (notifs) 
    101         throw logic_error("Got " + to_string(notifs) +  
     101        throw logic_error("Got " + to_string(notifs) + 
    102102            " unexpected notification(s)!"); 
    103103      // Sleep one second using a libpqxx-internal function.  Kids, don't try 
     
    110110    cout << endl; 
    111111 
    112     if (!Trig.Done())  
     112    if (!Trig.Done()) 
    113113    { 
    114114      cout << "No notification received!" << endl; 
  • trunk/test/test005.cxx

    r1124 r1138  
    5555    work T(C, "test5"); 
    5656 
    57     T.exec(("CREATE TABLE " +  
    58             TableName +  
     57    T.exec(("CREATE TABLE " + 
     58            TableName + 
    5959            "(year INTEGER, event VARCHAR)").c_str()); 
    6060 
     
    8282 
    8383    // Insert tuple of data using "begin" and "end" abstraction 
    84     for (int i=0; CData[i][0]; ++i)  
     84    for (int i=0; CData[i][0]; ++i) 
    8585      W.insert(&CData[i][0], &CData[i][2]); 
    8686 
  • trunk/test/test006.cxx

    r1040 r1138  
    1414 
    1515 
    16 // Test program for libpqxx.  Copy a table from one database connection to  
     16// Test program for libpqxx.  Copy a table from one database connection to 
    1717// another using a tablereader and a tablewriter.  Any data already in the 
    1818// destination table is overwritten. 
     
    2222// Where the connect-string is a set of connection options in Postgresql's 
    2323// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    24 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     24// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2525// running on host foo.bar.net, logging in as user smith. 
    2626// 
     
    2929// specified explicitly on the command line) connects to. 
    3030// 
    31 // The default origin table name is "pqxxorgevents"; the default destination  
     31// The default origin table name is "pqxxorgevents"; the default destination 
    3232// table is "pqxxevents". 
    3333 
     
    4444  void operator()(argument_type &T) 
    4545  { 
    46     T.exec(("CREATE TABLE " + m_Table +  
     46    T.exec(("CREATE TABLE " + m_Table + 
    4747            "(year INTEGER, event TEXT)").c_str()); 
    4848    cout << "Table " << m_Table << " created." << endl; 
     
    100100    CheckState(Org); 
    101101 
    102     // Copy table Org into table Dst.  This transfers all the data to the  
     102    // Copy table Org into table Dst.  This transfers all the data to the 
    103103    // frontend and back to the backend.  Since in this example Org and Dst are 
    104104    // really in the same database, we'd do this differently in real life; a 
     
    134134    // Set up a transaction to access the original table from 
    135135    work orgTrans(orgC, "test6org"); 
    136   
     136 
    137137    // Attempt to create table.  Ignore errors, as they're probably one of: 
    138138    // (1) Table already exists--fine with us 
     
    141141    { 
    142142      dstC.perform(CreateTable(dstTable)); 
    143     }  
     143    } 
    144144    catch (const exception &) 
    145145    { 
  • trunk/test/test007.cxx

    r1040 r1138  
    2222// backend running on host foo.bar.net, logging in as user smith. 
    2323// 
    24 // This assumes the existence of a database table "pqxxevents" containing a  
    25 // 2-digit "year" field, which is extended to a 4-digit format by assuming all  
    26 // year numbers of 70 or higher are in the 20th century, and all others in the  
     24// This assumes the existence of a database table "pqxxevents" containing a 
     25// 2-digit "year" field, which is extended to a 4-digit format by assuming all 
     26// year numbers of 70 or higher are in the 20th century, and all others in the 
    2727// 21st, and that no years before 1970 are possible. 
    2828 
     
    7676    if (rcctype != rctype) 
    7777      throw logic_error("Column has type " + rct + ", " 
    78                         "but by name, it's " + to_string(rcctype)); 
     78                        "but by name, it's " + to_string(rcctype)); 
    7979    const oid rawrcctype = R.column_type(rcol.c_str()); 
    8080    if (rawrcctype != rctype) 
     
    101101      if (ctctype != rctype) 
    102102        throw logic_error("Column has type " + rct + ", " 
    103                           "but by name, tuple says it's " + to_string(ctctype)); 
     103                          "but by name, tuple says it's " + to_string(ctctype)); 
    104104      const oid rawctctype = r->column_type(rcol.c_str()); 
    105105      if (rawctctype != rctype) 
    106106        throw logic_error("Column has type " + rct + ", " 
    107                           "but by C-style name, tuple says it's " +  
     107                          "but by C-style name, tuple says it's " + 
    108108                          to_string(rawctctype)); 
    109109      const oid fctype = r[0].type(); 
    110110      if (fctype != rctype) 
    111111        throw logic_error("Column has type " + rct + ", " 
    112                           "but field says it's " + to_string(fctype)); 
     112                          "but field says it's " + to_string(fctype)); 
    113113    } 
    114114 
  • trunk/test/test008.cxx

    r480 r1138  
    1111 
    1212 
    13 // Simple test program for libpqxx.  Read a table using a tablereader, which  
     13// Simple test program for libpqxx.  Read a table using a tablereader, which 
    1414// may be faster than a conventional query.  A tablereader is really a frontend 
    1515// for a PostgreSQL COPY TO stdout command. 
     
    1919// Where connect-string is a set of connection options in Postgresql's 
    2020// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    21 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     21// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2222// running on host foo.bar.net, logging in as user smith. 
    2323// 
    2424// The default table name is "pqxxevents" as used by other test programs. 
    2525// PostgreSQL currently implements pg_tables as a view, which cannot be read by 
    26 // using the COPY command.  Otherwise, pg_tables would have made a better  
     26// using the COPY command.  Otherwise, pg_tables would have made a better 
    2727// default value here. 
    2828int main(int argc, char *argv[]) 
  • trunk/test/test009.cxx

    r564 r1138  
    1919// Where the connect-string is a set of connection options in Postgresql's 
    2020// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    21 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     21// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2222// running on host foo.bar.net, logging in as user smith. 
    2323// 
     
    7575 
    7676  if (Rows != Contents.size()) 
    77     throw runtime_error("Found " +  
    78                         string(Count[0][0].c_str()) +  
     77    throw runtime_error("Found " + 
     78                        string(Count[0][0].c_str()) + 
    7979                        " rows in table--after writing " + 
    8080                        to_string(Contents.size()) + 
  • trunk/test/test010.cxx

    r478 r1138  
    1212 
    1313 
    14 // Test program for libpqxx.  Open connection to database, start a transaction,  
     14// Test program for libpqxx.  Open connection to database, start a transaction, 
    1515// abort it, and verify that it "never happened." 
    1616// 
     
    3737{ 
    3838  const string EventsQuery = "SELECT count(*) FROM " + Table; 
    39   const string BoringQuery = EventsQuery +  
    40                              " WHERE year=" +  
     39  const string BoringQuery = EventsQuery + 
     40                             " WHERE year=" + 
    4141                             to_string(BoringYear); 
    4242  int EventsCount = 0, 
     
    101101      throw runtime_error("Expected to find one event for " + 
    102102                          to_string(BoringYear) + ", " 
    103                           "found " +  
     103                          "found " + 
    104104                          to_string(Recount.second)); 
    105105 
    106106    if (Recount.first != EventCounts.first+1) 
    107       throw runtime_error("Number of events changed from " +  
     107      throw runtime_error("Number of events changed from " + 
    108108                          to_string(EventCounts.first) + " " 
    109109                          "to " + 
     
    120120 
    121121  // Now check that we're back in the original state.  Note that this may go 
    122   // wrong if somebody managed to change the table between our two  
     122  // wrong if somebody managed to change the table between our two 
    123123  // transactions. 
    124124  work Checkup(C, "Checkup"); 
     
    126126  const pair<int,int> NewEvents = CountEvents(Checkup); 
    127127  if (NewEvents.first != EventCounts.first) 
    128     throw runtime_error("Number of events changed from " +  
     128    throw runtime_error("Number of events changed from " + 
    129129                        to_string(EventCounts.first) + " " 
    130130                        "to " + 
  • trunk/test/test011.cxx

    r621 r1138  
    3838      cout << c << ":\t" << N << endl; 
    3939      if (R.column_number(N) != c) 
    40         throw logic_error("Expected column '" + N +  
     40        throw logic_error("Expected column '" + N + 
    4141                          "' to be no. " + to_string(c) + ", " 
    4242                          "but it was no. " + to_string(R.column_number(N))); 
     
    4646    if (!R.empty()) 
    4747    { 
    48       if (R[0].rownumber() != 0)  
     48      if (R[0].rownumber() != 0) 
    4949        throw logic_error("Row 0 said it was row " + R[0].rownumber()); 
    5050 
     
    8787        if (size_t(R[0][c].size()) != strlen(R[0][c].c_str())) 
    8888          throw logic_error("Field '" + N + "' " 
    89                             "says its length is " + to_string(R[0][c].size()) +  
     89                            "says its length is " + to_string(R[0][c].size()) + 
    9090                            ", " 
    9191                            "but its value is '" + R[0][c].c_str() + "' " 
  • trunk/test/test012.cxx

    r421 r1138  
    2626namespace 
    2727{ 
    28 template<typename VEC, typename VAL>  
     28template<typename VEC, typename VAL> 
    2929void InitVector(VEC &V, typename VEC::size_type s, VAL val) 
    3030{ 
     
    6363    { 
    6464      if ((*i).rownumber() != i->rownumber()) 
    65         throw logic_error("Inconsistent rows: operator*() says " +  
     65        throw logic_error("Inconsistent rows: operator*() says " + 
    6666                          to_string((*i).rownumber()) + ", " 
    6767                          "operator->() says " + 
     
    9898                            to_string(j-i)); 
    9999 
    100         if ((j == i) || !(j != i) ||  
     100        if ((j == i) || !(j != i) || 
    101101            (j >= i) || (j > i) || 
    102102            (i <= j) || (i < j) || 
     
    150150           << R.column_name(f) << '\t' 
    151151           << NullFields[f] << '\t' 
    152            << (SortedUp[f] ?  
    153                 (SortedDown[f] ? "equal" : "up" ) :  
     152           << (SortedUp[f] ? 
     153                (SortedDown[f] ? "equal" : "up" ) : 
    154154                (SortedDown[f] ? "down" : "no" ) ) 
    155155           << endl; 
  • trunk/test/test013.cxx

    r1040 r1138  
    4343  pair<int, int> &m_Results; 
    4444public: 
    45   CountEvents(string Table, pair<int,int> &Results) :  
     45  CountEvents(string Table, pair<int,int> &Results) : 
    4646    transactor<>("CountEvents"), m_Table(Table), m_Results(Results) {} 
    4747 
     
    6565  string m_Table; 
    6666public: 
    67   FailedInsert(string Table) :  
     67  FailedInsert(string Table) : 
    6868    transactor<>("FailedInsert"), 
    6969    m_Table(Table) 
     
    113113    pair<int,int> Before; 
    114114    C.perform(CountEvents(Table, Before)); 
    115     if (Before.second)  
    116       throw runtime_error("Table already has an event for " +  
     115    if (Before.second) 
     116      throw runtime_error("Table already has an event for " + 
    117117                          to_string(BoringYear) + ", " 
    118118                          "cannot run."); 
     
    134134    if (After != Before) 
    135135      throw logic_error("Event counts changed from " 
    136                         "{" + to_string(Before.first) + "," +  
     136                        "{" + to_string(Before.first) + "," + 
    137137                        to_string(Before.second) + "} " 
    138138                        "to " 
  • trunk/test/test014.cxx

    r822 r1138  
    1010 
    1111 
    12 // Define a pqxx::noticer to process warnings generated by the database  
     12// Define a pqxx::noticer to process warnings generated by the database 
    1313// connection and (in this case) pass them to cerr.  This is optional. 
    1414namespace 
     
    6666 
    6767    // Begin a "non-transaction" acting on our current connection.  This is 
    68     // really all the transactional integrity we need since we're only  
     68    // really all the transactional integrity we need since we're only 
    6969    // performing one query which does not modify the database. 
    7070    nontransaction T(C, "test14"); 
  • trunk/test/test016.cxx

    r622 r1138  
    2525 
    2626    // Begin a "non-transaction" acting on our current connection.  This is 
    27     // really all the transactional integrity we need since we're only  
     27    // really all the transactional integrity we need since we're only 
    2828    // performing one query which does not modify the database. 
    2929    robusttransaction<> T(C, "test16"); 
  • trunk/test/test018.cxx

    r1069 r1138  
    4040  pair<int, int> &m_Results; 
    4141public: 
    42   CountEvents(string Table, pair<int,int> &Results) :  
    43     transactor<nontransaction>("CountEvents"),  
    44     m_Table(Table),  
    45     m_Results(Results)  
     42  CountEvents(string Table, pair<int,int> &Results) : 
     43    transactor<nontransaction>("CountEvents"), 
     44    m_Table(Table), 
     45    m_Results(Results) 
    4646  { 
    4747  } 
     
    6767  static string LastReason; 
    6868public: 
    69   FailedInsert(string Table) :  
    70     transactor<argument_type>("FailedInsert"),  
     69  FailedInsert(string Table) : 
     70    transactor<argument_type>("FailedInsert"), 
    7171    m_Table(Table) 
    7272  { 
     
    8585    if (Reason != LastReason) 
    8686    { 
    87       cout << "(Expected) Transactor " << Name() << " failed: "  
     87      cout << "(Expected) Transactor " << Name() << " failed: " 
    8888           << Reason << endl; 
    8989      LastReason = Reason; 
     
    117117    pair<int,int> Before; 
    118118    C.perform(CountEvents(Table, Before)); 
    119     if (Before.second)  
    120       throw runtime_error("Table already has an event for " +  
     119    if (Before.second) 
     120      throw runtime_error("Table already has an event for " + 
    121121                          to_string(BoringYear) + ", " 
    122122                          "cannot run."); 
     
    138138    if (After != Before) 
    139139      throw logic_error("Event counts changed from " 
    140                         "{" + to_string(Before.first) + "," +  
     140                        "{" + to_string(Before.first) + "," + 
    141141                        to_string(Before.second) + "} " 
    142142                        "to " 
  • trunk/test/test019.cxx

    r898 r1138  
    1515 
    1616 
    17 // Cursor test program for libpqxx.  Read table through a cursor, scanning back  
     17// Cursor test program for libpqxx.  Read table through a cursor, scanning back 
    1818// and forth and checking for consistent results. 
    1919// 
     
    6060    R.at(0).at(0).to(Rows); 
    6161 
    62     if (Rows <= 10)  
     62    if (Rows <= 10) 
    6363      throw runtime_error("Not enough rows in '" + Table + "' " 
    6464                          "for serious testing.  Sorry."); 
     
    123123 
    124124    R = Cur.fetch(cursor_base::next()); 
    125     if (R.size() != 1)  
     125    if (R.size() != 1) 
    126126      throw logic_error("NEXT: wanted 1 row, got " + to_string(R.size())); 
    127127    const string Row = R[0][0].c_str(); 
  • trunk/test/test020.cxx

    r428 r1138  
    1111 
    1212// Test program for libpqxx.  Modify the database inside a NonTransaction, and 
    13 // verify that the change gets made regardless of whether the NonTransaction is  
     13// verify that the change gets made regardless of whether the NonTransaction is 
    1414// eventually committed or aborted. 
    1515// 
     
    2121// backend running on host foo.bar.net, logging in as user smith. 
    2222// 
    23 // The table argument is the table being modified.  This defaults to  
     23// The table argument is the table being modified.  This defaults to 
    2424// "pqxxevents". 
    2525// It is assumed to consist of an integer key called year, and a string. 
     
    4646                       "WHERE year=" + to_string(BoringYear)).c_str()) ); 
    4747    if (R.size() != 0) 
    48       throw runtime_error("There is already a record for " +  
     48      throw runtime_error("There is already a record for " + 
    4949                          to_string(BoringYear) + ". " 
    5050                          "Can't run test."); 
     
    7272                 "WHERE year=" + to_string(BoringYear)).c_str()); 
    7373    if (R.size() != 1) 
    74       throw runtime_error("Expected to find 1 record for " +  
     74      throw runtime_error("Expected to find 1 record for " + 
    7575                          to_string(BoringYear) + ", found " + 
    7676                          to_string(R.size()) + ". " 
  • trunk/test/test022.cxx

    r898 r1138  
    1313 
    1414// Test program for libpqxx.  Read list of tables through a cursor, starting 
    15 // with a deferred connection.  Default blocksize is 1; use 0 to read all rows  
     15// with a deferred connection.  Default blocksize is 1; use 0 to read all rows 
    1616// at once.  Negative blocksizes read backwards. 
    1717// 
  • trunk/test/test023.cxx

    r1040 r1138  
    3636    if (be_pid != Conn().backendpid()) 
    3737      throw logic_error("Expected notification from backend process " + 
    38                         to_string(Conn().backendpid()) +  
     38                        to_string(Conn().backendpid()) + 
    3939                        ", but got one from " + 
    4040                        to_string(be_pid)); 
     
    5353 
    5454public: 
    55   explicit Notify(string TrigName) :  
     55  explicit Notify(string TrigName) : 
    5656    transactor<>("Notifier"), m_Trigger(TrigName) { } 
    5757 
     
    9999    cout << endl; 
    100100 
    101     if (!Trig.Done())  
     101    if (!Trig.Done()) 
    102102    { 
    103103      cout << "No notification received!" << endl; 
  • trunk/test/test024.cxx

    r489 r1138  
    1010 
    1111 
    12 // Test program for libpqxx.  Write a predetermined data set to a table using a  
    13 // tablewriter on a deferred connection.  This data will be used by subsequent  
     12// Test program for libpqxx.  Write a predetermined data set to a table using a 
     13// tablewriter on a deferred connection.  This data will be used by subsequent 
    1414// tests.  Any data previously in the table will be deleted. 
    1515// 
     
    4848    T.exec("CREATE TABLE " + TableName + "(year INTEGER, event VARCHAR)"); 
    4949 
    50     // NOTE: start a nested block here to ensure that our stream W is closed  
    51     // before we attempt to commit our transaction T.  Otherwise we might end  
     50    // NOTE: start a nested block here to ensure that our stream W is closed 
     51    // before we attempt to commit our transaction T.  Otherwise we might end 
    5252    // up committing T before all data going into W had been written. 
    5353    { 
     
    7474 
    7575      // Insert tuple of data using "begin" and "end" abstraction 
    76       for (int i=0; CData[i][0]; ++i)  
     76      for (int i=0; CData[i][0]; ++i) 
    7777        W.insert(&CData[i][0], &CData[i][2]); 
    7878 
  • trunk/test/test025.cxx

    r1040 r1138  
    1313 
    1414 
    15 // Test program for libpqxx.  Copy a table from one database connection to  
     15// Test program for libpqxx.  Copy a table from one database connection to 
    1616// another using a tablereader and a tablewriter.  Any data already in the 
    1717// destination table is overwritten.  Lazy connections are used. 
     
    2121// Where the connect-string is a set of connection options in Postgresql's 
    2222// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    23 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     23// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2424// running on host foo.bar.net, logging in as user smith. 
    2525// 
     
    2828// specified explicitly on the command line) connects to. 
    2929// 
    30 // The default origin table name is "pqxxorgevents"; the default destination  
     30// The default origin table name is "pqxxorgevents"; the default destination 
    3131// table is "pqxxevents". 
    3232 
     
    9898    CheckState(Org); 
    9999 
    100     // Copy table Org into table Dst.  This transfers all the data to the  
     100    // Copy table Org into table Dst.  This transfers all the data to the 
    101101    // frontend and back to the backend.  Since in this example Ord and Dst are 
    102102    // really in the same database, we'd do this differently in real life; a 
     
    132132    // Set up a transaction to access the original table from 
    133133    work orgTrans(orgC, "test25org"); 
    134   
     134 
    135135    // Attempt to create table.  Ignore errors, as they're probably one of: 
    136136    // (1) Table already exists--fine with us 
     
    139139    { 
    140140      dstC.perform(CreateTable(dstTable)); 
    141     }  
     141    } 
    142142    catch (const sql_error &) 
    143143    { 
  • trunk/test/test026.cxx

    r1040 r1138  
    2121// backend running on host foo.bar.net, logging in as user smith. 
    2222// 
    23 // This assumes the existence of a database table "pqxxevents" containing a  
    24 // 2-digit "year" field, which is extended to a 4-digit format by assuming all  
    25 // year numbers of 70 or higher are in the 20th century, and all others in the  
     23// This assumes the existence of a database table "pqxxevents" containing a 
     24// 2-digit "year" field, which is extended to a 4-digit format by assuming all 
     25// year numbers of 70 or higher are in the 20th century, and all others in the 
    2626// 21st, and that no years before 1970 are possible. 
    2727 
     
    6666 
    6767      // Read year, and if it is non-null, note its converted value 
    68       if (r[0].to(Y))  
     68      if (r[0].to(Y)) 
    6969        m_Conversions[Y] = To4Digits(Y); 
    7070    } 
  • trunk/test/test027.cxx

    r328 r1138  
    1111 
    1212 
    13 // Test program for libpqxx.  Read a table using a tablereader, which may be  
     13// Test program for libpqxx.  Read a table using a tablereader, which may be 
    1414// faster than a conventional query, on a lazy connection. 
    1515// 
     
    1818// Where connect-string is a set of connection options in Postgresql's 
    1919// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    20 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     20// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2121// running on host foo.bar.net, logging in as user smith. 
    2222// 
    2323// The default table name is "pqxxevents" as used by other test programs. 
    2424// PostgreSQL currently implements pg_tables as a view, which cannot be read by 
    25 // using the COPY command.  Otherwise, pg_tables would have made a better  
     25// using the COPY command.  Otherwise, pg_tables would have made a better 
    2626// default value here. 
    2727int main(int argc, char *argv[]) 
  • trunk/test/test028.cxx

    r421 r1138  
    1919// Where the connect-string is a set of connection options in Postgresql's 
    2020// PQconnectdb() format, eg. "dbname=template1" to select from a database 
    21 // called template1, or "host=foo.bar.net user=smith" to connect to a backend  
     21// called template1, or "host=foo.bar.net user=smith" to connect to a backend 
    2222// running on host foo.bar.net, logging in as user smith. 
    2323// 
     
    7575 
    7676  if (Rows != Contents.size()) 
    77     throw runtime_error("Found " +  
    78                         string(Count[0][0].c_str()) +  
     77    throw runtime_error("Found " + 
     78                        string(Count[0][0].c_str()) + 
    7979                        " rows in table--after writing " + 
    8080                        to_string(Contents.size()) + 
  • trunk/test/test029.cxx

    r421 r1138  
    1212 
    1313 
    14 // Test program for libpqxx.  Open connection to database, start a transaction,  
     14// Test program for libpqxx.  Open connection to database, start a transaction, 
    1515// abort it, and verify that it "never happened."  Use lazy connection. 
    1616// 
     
    3838{ 
    3939  const string EventsQuery = "SELECT count(*) FROM " + Table; 
    40   const string BoringQuery = EventsQuery +  
    41                              " WHERE year=" +  
     40  const string BoringQuery = EventsQuery + 
     41                             " WHERE year=" + 
    4242                             to_string(BoringYear); 
    4343  int EventsCount = 0, 
     
    104104      throw runtime_error("Expected to find one event for " + 
    105105                          to_string(BoringYear) + ", " 
    106                           "found " +  
     106                          "found " + 
    107107                          to_string(Recount.second)); 
    108108 
    109109    if (Recount.first != EventCounts.first+1) 
    110       throw runtime_error("Number of events changed from " +  
     110      throw runtime_error("Number of events changed from " + 
    111111                          to_string(EventCounts.first) + " " 
    112112                          "to " + 
     
    123123 
    124124  // Now check that we're back in the original state.  Note that this may go 
    125   // wrong if somebody managed to change the table between our two  
     125  // wrong if somebody managed to change the table between our two 
    126126  // transactions. 
    127127  work Checkup(C, "Checkup"); 
     
    129129  const pair<int,int> NewEvents = CountEvents(Checkup); 
    130130  if (NewEvents.first != EventCounts.first) 
    131     throw runtime_error("Number of events changed from " +  
     131    throw runtime_error("Number of events changed from " + 
    132132                        to_string(EventCounts.first) + " " 
    133133                        "to " + 
  • trunk/test/test030.cxx

    r421 r1138  
    4343 
    4444      if (R[0].column_number(N) != R.column_number(N)) 
    45         throw logic_error("tuple::column_number(" + N + ") is " +  
     45        throw logic_error("tuple::column_number(" + N + ") is " + 
    4646                          to_string(R[0].column_number(N)) + ", " 
    4747                          "but result::column_number(" + N + ") is " + 
     
    4949 
    5050      if (R[0].column_number(N.c_str()) != c) 
    51         throw logic_error("Expected column '" + N +  
     51        throw logic_error("Expected column '" + N + 
    5252                          "' to be no. " + to_string(c) + ", " 
    5353                          "but it was no. " + to_string(R.column_number(N))); 
     
    5757    if (!R.empty()) 
    5858    { 
    59       if (R[0].rownumber() != 0)  
     59      if (R[0].rownumber() != 0) 
    6060        throw logic_error("Row 0 said it was row " + R[0].rownumber()); 
    6161 
     
    8585        if (size_t(R[0][c].size()) != strlen(R[0][c].c_str())) 
    8686          throw logic_error("Field '" + N + "' " 
    87                             "says its length is " + to_string(R[0][c].size()) +  
     87                            "says its length is " + to_string(R[0][c].size()) + 
    8888                            ", " 
    8989                            "but its value is '" + R[0][c].c_str() + "' " 
  • trunk/test/test031.cxx

    r421 r1138  
    2626namespace 
    2727{ 
    28 template<typename VEC, typename VAL>  
     28template<typename VEC, typename VAL> 
    2929void InitVector(VEC &V, typename VEC::size_type s, VAL val) 
    3030{ 
     
    6262    { 
    6363      if ((*i).rownumber() != i->rownumber()) 
    64         throw logic_error("Inconsistent rows: operator*() says " +  
     64        throw logic_error("Inconsistent rows: operator*() says " + 
    6565                          to_string((*i).rownumber()) + ", " 
    6666                          "operator->() says " + 
     
    9797                            to_string(j-i)); 
    9898 
    99         if ((j == i) || !(j != i) ||  
     99        if ((j == i) || !(j != i) || 
    100100            (j >= i) || (j > i) || 
    101101            (i <= j) || (i < j) || 
     
    149149           << R.column_name(f) << '\t' 
    150150           << NullFields[f] << '\t' 
    151            << (SortedUp[f] ?  
    152                 (SortedDown[f] ? "equal" : "up" ) :  
     151           << (SortedUp[f] ? 
     152                (SortedDown[f] ? "equal" : "up" ) : 
    153153                (SortedDown[f] ? "down" : "no" ) ) 
    154154           << endl; 
  • trunk/test/test032.cxx

    r1040 r1138  
    4343  pair<int, int> &m_Results; 
    4444public: 
    45   CountEvents(string Table, pair<int,int> &Results) :  
     45  CountEvents(string Table, pair<int,int> &Results) : 
    4646    transactor<>("CountEvents"), m_Table(Table), m_Results(Results) {} 
    4747