Changeset 91

Show
Ignore:
Timestamp:
01/21/08 20:33:51 (1 year ago)
Author:
zork
Message:

docs revised to SQLArchive

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/debea_1_2/dba/dba/csv.h

    r90 r91  
    328328    virtual void destroy(); 
    329329    //csv format does not support transactions 
     330    /** 
     331      For CSV file format this method does nothing 
     332    */ 
    330333    virtual void begin() {}; 
     334    /** 
     335      For CSV file format this method does nothing 
     336    */ 
    331337    virtual void commit() {}; 
     338    /** 
     339      For CSV file format this method does nothing 
     340    */ 
    332341    virtual void rollback() {}; 
    333342    /** 
  • branches/debea_1_2/dba/dba/database.h

    r90 r91  
    271271 
    272272/** 
    273   This class represents result of executed query by callins DbConnection.sendQuery() 
    274   It allows to discover column names and get data from database as one of four types 
    275   specified in Database::StoreType enum 
     273  This class represents result of SQL query. 
     274  It allows to discover column names and get data from database as one of four C types. 
    276275  @ingroup api 
    277276*/ 
     
    282281    */ 
    283282    static const struct tm sInvalidTm; 
    284     /** 
    285       @return number of columns in result. Columns are numbered from zero 
     283    /** @name Dataset operations 
     284    */ 
     285    //@{ 
     286    /** 
     287      Get number of columns. 
     288      @return number of columns in result. 
    286289    */ 
    287290    virtual int columns() const = 0; 
    288291    /** 
    289       @param pIndex number of column (in query order) 
     292      Get column description. 
     293      @param pIndex number of column (in query order), starting from zero. 
    290294      @return i-th column description. 
    291295    */ 
    292296    virtual const DbColumn& getColumn(int pIndex) const = 0; 
    293297    /** 
    294       Those functions returns data from current row converting internal data representation 
    295       to return data type. Field in row can be specified using column index or field name. 
    296       Column index starts from zero. 
    297     */ 
    298     //@{ 
    299     /** 
    300       Get field as string value 
    301       @param pField field name 
    302     */ 
    303     const char* getString(const char* pField) const { return getString(getColumnIndex(pField)); } 
    304     /** 
    305       Get field as string value 
    306       @param pField field index 
    307     */ 
    308     const char* getString(int pField) const; 
    309     /** 
    310       Get field as int value 
    311       @param pField field name 
    312     */ 
    313     long getInt(const char* pField) const { return getInt(getColumnIndex(pField)); } 
    314     /** 
    315       Get field as int value 
    316       @param pField field index 
    317     */ 
    318     long getInt(int pField) const; 
    319     /** 
    320       Get field as double value 
    321       @param pField field name 
    322     */ 
    323     double getDouble(const char* pField) const { return getDouble(getColumnIndex(pField)); } 
    324     /** 
    325       Get field as double value 
    326       @param pField field index 
    327     */ 
    328     double getDouble(int pField) const; 
    329     /** 
    330       Get field as date value 
    331       @param pField field name 
    332     */ 
    333     struct tm getDate(const char* pField) const { return getDate(getColumnIndex(pField)); } 
    334     /** 
    335       Get field as date value 
    336       @param pField field index 
    337     */ 
    338     struct tm getDate(int pField) const; 
    339     /** 
    340       Check if field contains null value 
    341       @param pField field name 
    342       @return true if field is null, false otherwise 
    343     */ 
    344     bool isNull(const char* pField) const { return doCheckNull(getColumnIndex(pField)); } 
    345     /** 
    346       Check if field contains null value 
    347       @param pField field index 
    348       @return true if field is null, false otherwise 
    349     */ 
    350     bool isNull(int pField) const { return doCheckNull(pField); } 
    351     //@} 
    352     /** 
    353       Cancel query processing. This operation can be one only once for DbResult 
     298      Cancel query processing. This operation can be one only once for DbResult and currently is supported for ODBC driver only. 
    354299    */ 
    355300    virtual void cancel() {}; 
     
    361306    */ 
    362307    virtual bool fetchRow() = 0; 
     308    //@} 
     309    /** @name Data Access 
     310      Those functions returns data from current row converting internal data representation 
     311      to return data type. Field in row can be specified using column index or field name. 
     312      Column index starts from zero. If SQL type that driver returned is different from 
     313      returned type, then SQL type is converted to type to return. If conversion fails, then 
     314      DataException is thrown. 
     315    */ 
     316    //@{ 
     317    /** 
     318      Get field as string value 
     319      @param pField field name 
     320    */ 
     321    const char* getString(const char* pField) const { return getString(getColumnIndex(pField)); } 
     322    /** 
     323      Get field as string value 
     324      @param pField field index 
     325    */ 
     326    const char* getString(int pField) const; 
     327    /** 
     328      Get field as int value 
     329      @param pField field name 
     330    */ 
     331    long getInt(const char* pField) const { return getInt(getColumnIndex(pField)); } 
     332    /** 
     333      Get field as int value 
     334      @param pField field index 
     335    */ 
     336    long getInt(int pField) const; 
     337    /** 
     338      Get field as double value 
     339      @param pField field name 
     340    */ 
     341    double getDouble(const char* pField) const { return getDouble(getColumnIndex(pField)); } 
     342    /** 
     343      Get field as double value 
     344      @param pField field index 
     345    */ 
     346    double getDouble(int pField) const; 
     347    /** 
     348      Get field as date value 
     349      @param pField field name 
     350    */ 
     351    struct tm getDate(const char* pField) const { return getDate(getColumnIndex(pField)); } 
     352    /** 
     353      Get field as date value 
     354      @param pField field index 
     355    */ 
     356    struct tm getDate(int pField) const; 
     357    /** 
     358      Check if field contains null value 
     359      @param pField field name 
     360      @return true if field is null, false otherwise 
     361    */ 
     362    bool isNull(const char* pField) const { return doCheckNull(getColumnIndex(pField)); } 
     363    /** 
     364      Check if field contains null value 
     365      @param pField field index 
     366      @return true if field is null, false otherwise 
     367    */ 
     368    bool isNull(int pField) const { return doCheckNull(pField); } 
     369    //@} 
    363370    virtual ~DbResult() {}; 
    364371  protected: 
  • branches/debea_1_2/dba/dba/dbupdate.h

    r47 r91  
    2323  database schema update. This interface allows progress bar implementation for  
    2424  derived classes. 
    25   @ingroup api 
     25   
     26  This interface requires SQL table db_version to exists in database with following schema: 
     27@code 
     28CREATE TABLE db_version ( 
     29  version VARCHAR(128) 
     30); 
     31@endcode 
     32@ingroup api 
    2633*/ 
    2734class dbaDLLEXPORT DbUpdate { 
  • branches/debea_1_2/dba/dba/exception.h

    r90 r91  
    7272 
    7373/** 
    74   Base class for exceptions thrown when daba from database is manipulated 
    75   - for example conversion from string to int failed, bad sql query was executed  
     74 
     75  Base class for exceptions thrown when daba from database is manipulated, 
     76  for example conversion from string to int failed, bad sql query was executed  
    7677  or parser could not parse corrupted csv file. 
    7778  @ingroup api 
  • branches/debea_1_2/dba/dba/idlocker.h

    r73 r91  
    1414 
    1515/** 
    16 Helper class to lock id of object when using assignemt operator 
     16Helper class to lock id of object when using assigment operator 
    1717 
    1818Id of all objects are locked until at least one locker exists, so this object should be created only on stack. 
  • branches/debea_1_2/dba/dba/istream.h

    r36 r91  
    3131  Then you want to get variables first, find referenced objects and and then create object using  
    3232  getNext(). 
     33   
     34  As getNext is useful when fetching single Storeable objects, you can use get() to load  
     35  particular Storeable derived object and all subobjects that are specified using BIND_COL  
     36  or BIND_CLA macros. 
    3337 
    3438  You can open stream by using Stream::open() method. 
     
    8892      configure stream to open for records that have one of values from array 
    8993      in field named pFKeyName. Used by getChildren to retrieve reference data  
    90       for BIND_COL collections 
     94      for BIND_COL collections. 
    9195      @param pFKeyName name of foreign key field 
    9296      @param pRelationId collection identification from BIND_CLA or Storeable::Invalid if not used 
  • branches/debea_1_2/dba/dba/ostream.h

    r20 r91  
    3333    /** 
    3434      Commit all changes made to stream from point where begin() was called. 
     35      @note You should use dba::Transaction object instead of calling this method 
    3536    */ 
    3637    virtual void commit() = 0; 
    3738    /** 
    3839      Cancel all changes to stream from point where begin() was called. 
     40      @note You should use dba::Transaction object instead of calling this method 
    3941    */ 
    4042    virtual void rollback() = 0; 
     
    4345      in database that are affected by putting pObject. 
    4446       
    45       Depending on state of pObject store, erase or update is called 
     47      Depending on state of pObject store, erase or update is called. 
     48      @note You should use dba::Transaction object instead of calling this method 
    4649      @param pObject object to store 
    4750    */ 
  • branches/debea_1_2/dba/dba/sharedsqlarchive.h

    r79 r91  
    2929    */ 
    3030    typedef enum { 
    31       TRANS_USE_LAST, //!create child transaction 
    32       TRANS_NEW //!create new transaction 
     31      TRANS_USE_LAST, //!<create child of last existing transaction 
     32      TRANS_NEW //!<create new transaction 
    3333    } creationType; 
    3434    /** 
  • branches/debea_1_2/dba/dba/single.h

    r73 r91  
    3131        Storeable& mObject; 
    3232    }; 
     33    /** 
     34      Constructor 
     35      @param pObj object to be updated 
     36    */ 
    3337    Single(Storeable& pObj) : CollectionFilter<Storeable>(pObj) {}; 
    3438    virtual CollectionFilterIterator* createIterator() const { return new iterator(*mMember); }; 
  • branches/debea_1_2/dba/dba/stddeque.h

    r48 r91  
    4747    /** 
    4848      Constructor 
    49       @param pList object that will be modified by filter 
     49      @param pDeque object that will be modified by filter 
    5050    */ 
    5151    stdDeque(std::deque<T>& pDeque) : InstanceFilter<std::deque<T>, T>(pDeque) {}; 
  • branches/debea_1_2/dba/dba/stdset.h

    r48 r91  
    5050    /** 
    5151      Constructor 
    52       @param pList object that will be modified by filter 
     52      @param pSet object that will be modified by filter 
    5353    */ 
    5454    stdSet(std::set<T>& pSet) : InstanceFilter<std::set<T>, T>(pSet) {}; 
  • branches/debea_1_2/dba/dba/stdvector.h

    r48 r91  
    4747    /** 
    4848      Constructor 
    49       @param pList object that will be modified by filter 
     49      @param pVector object that will be modified by filter 
    5050    */ 
    51     stdVector(std::vector<T>& pSet) : InstanceFilter<std::vector<T>, T>(pSet) {}; 
     51    stdVector(std::vector<T>& pVector) : InstanceFilter<std::vector<T>, T>(pVector) {}; 
    5252    virtual CollectionFilterIterator* createIterator() const { return new iterator(*mMember); }; 
    5353    virtual void clear() { mMember->clear(); }; 
  • branches/debea_1_2/dba/docs/dba.doxyfile

    r14 r91  
    130130    $(SRCDIR)/dba/double_filter.h \ 
    131131    $(SRCDIR)/dba/exception.h \ 
     132    $(SRCDIR)/dba/genericfetcher.h \ 
    132133    $(SRCDIR)/dba/idlocker.h \ 
    133134    $(SRCDIR)/dba/int_filter.h \ 
     
    137138    $(SRCDIR)/dba/plugininfo.h \ 
    138139    $(SRCDIR)/dba/sharedsqlarchive.h \ 
     140    $(SRCDIR)/dba/single.h \ 
    139141    $(SRCDIR)/dba/sqlarchive.h \ 
     142    $(SRCDIR)/dba/sqlidfetcher.h \ 
     143    $(SRCDIR)/dba/sqlistream.h \ 
     144    $(SRCDIR)/dba/sqlostream.h \ 
    140145    $(SRCDIR)/dba/sqlutils.h \ 
    141146    $(SRCDIR)/dba/stdfilters.h \ 
     147    $(SRCDIR)/dba/stddeque.h \ 
    142148    $(SRCDIR)/dba/stdlist.h \ 
     149    $(SRCDIR)/dba/stdmultiset.h \ 
     150    $(SRCDIR)/dba/stdset.h \ 
    143151    $(SRCDIR)/dba/stlutils.h \ 
     152    $(SRCDIR)/dba/stdvector.h \ 
    144153    $(SRCDIR)/dba/storeable.h \ 
    145154    $(SRCDIR)/dba/storeablefilter.h \ 
    146     $(SRCDIR)/dba/storeablelist.h \ 
    147155    $(SRCDIR)/dba/string_filter.h \ 
    148156    $(SRCDIR)/dba/stream.h