Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/commonal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.118 by tani, Tue Jan 10 10:56:30 2006 UTC revision 1.119 by tani, Fri Apr 7 08:19:51 2006 UTC
# Line 22  Line 22 
22   *   *
23   * $Revision$   * $Revision$
24   * $Log$   * $Log$
25     * Revision 1.119  2006/04/07 08:19:51  tani
26     * doiをDBから取得する時の型指定をBLOBにあわせて修正.
27     *
28   * Revision 1.118  2006/01/10 10:56:30  tani   * Revision 1.118  2006/01/10 10:56:30  tani
29   * selectiveHarvesting:stat.item_idでorder by(asc)   * selectiveHarvesting:stat.item_idでorder by(asc)
30   *   *
# Line 3793  static result_t _insertItem( sessionid_t Line 3796  static result_t _insertItem( sessionid_t
3796              SQLBindParameter(hstmt, 11, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &publication_mday, 0, &cbPublication_mday );              SQLBindParameter(hstmt, 11, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &publication_mday, 0, &cbPublication_mday );
3797              SQLBindParameter(hstmt, 12, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_LONGVARCHAR, XNP_ITEM_LANG_LEN, 0, lang, 0, &cbLang );              SQLBindParameter(hstmt, 12, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_LONGVARCHAR, XNP_ITEM_LANG_LEN, 0, lang, 0, &cbLang );
3798                            
3799                //アイテム情報をitem構造体からSQL_CHAR配列へコピーする
3800              strncpy2( (char*)title, item -> getTitle(), XNP_ITEM_TITLE_LEN );              strncpy2( (char*)title, item -> getTitle(), XNP_ITEM_TITLE_LEN );
3801              strncpy2( (char*)keywords, item -> getKeywords(), XNP_ITEM_KEYWORDS_LEN );              strncpy2( (char*)keywords, item -> getKeywords(), XNP_ITEM_KEYWORDS_LEN );
3802              strncpy2( (char*)description, item -> getDescription(), XNP_ITEM_DESCRIPTION_LEN );              strncpy2( (char*)description, item -> getDescription(), XNP_ITEM_DESCRIPTION_LEN );
# Line 3995  result_t getItems( sessionid_t sid, cons Line 3999  result_t getItems( sessionid_t sid, cons
3999              SQLBindCol( hstmt, 11, SQL_C_SLONG, &publication_month, 0, &cbPublication_month );              SQLBindCol( hstmt, 11, SQL_C_SLONG, &publication_month, 0, &cbPublication_month );
4000              SQLBindCol( hstmt, 12, SQL_C_SLONG, &publication_mday, 0, &cbPublication_mday );              SQLBindCol( hstmt, 12, SQL_C_SLONG, &publication_mday, 0, &cbPublication_mday );
4001                            
4002                //取得したアイテムの情報をitem構造体へコピーする
4003                //DOIはBLOB型→char*型へ変換のため,引数でSQL_C_BINARYを明示する
4004              *itemsLen = 0;              *itemsLen = 0;
4005              for( int i = 0; ( sqlcode = SQLFetch( hstmt ) ) == SQL_SUCCESS && i < iidsLen ; i++ ){              for( int i = 0; ( sqlcode = SQLFetch( hstmt ) ) == SQL_SUCCESS && i < iidsLen ; i++ ){
4006                  dst[ i ].setItemID( item_id );                  dst[ i ].setItemID( item_id );
# Line 4002  result_t getItems( sessionid_t sid, cons Line 4008  result_t getItems( sessionid_t sid, cons
4008                  dst[ i ].setTitle( getResultCol( hstmt, 3 ).c_str() );                  dst[ i ].setTitle( getResultCol( hstmt, 3 ).c_str() );
4009                  dst[ i ].setKeywords( getResultCol( hstmt, 4 ).c_str() );                  dst[ i ].setKeywords( getResultCol( hstmt, 4 ).c_str() );
4010                  dst[ i ].setDescription( getResultCol( hstmt, 5 ).c_str() );                  dst[ i ].setDescription( getResultCol( hstmt, 5 ).c_str() );
4011                  dst[ i ].setDOI( getResultCol( hstmt, 6 ).c_str() );                  dst[ i ].setDOI( getResultCol( hstmt, 6, SQL_C_BINARY ).c_str() );
4012                  dst[ i ].setContributorUID( uid );                  dst[ i ].setContributorUID( uid );
4013                  dst[ i ].setCreationDate( creation_date );                  dst[ i ].setCreationDate( creation_date );
4014                  dst[ i ].setLastUpdateDate( last_update_date );                  dst[ i ].setLastUpdateDate( last_update_date );
# Line 4270  result_t updateItem( sessionid_t sid, co Line 4276  result_t updateItem( sessionid_t sid, co
4276              SQLBindParameter(hstmt, 11, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_LONGVARCHAR, XNP_ITEM_LANG_LEN, 0, lang, 0, &cbLang );              SQLBindParameter(hstmt, 11, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_LONGVARCHAR, XNP_ITEM_LANG_LEN, 0, lang, 0, &cbLang );
4277              SQLBindParameter(hstmt, 12, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &item_id, 0, &cbItem_id );              SQLBindParameter(hstmt, 12, SQL_PARAM_INPUT, SQL_C_LONG, SQL_INTEGER, 0, 0, &item_id, 0, &cbItem_id );
4278                            
4279                //DBから得られたカラムの値をitem構造体へコピーする
4280              strncpy2( (char*)title, item -> getTitle(), XNP_ITEM_TITLE_LEN );              strncpy2( (char*)title, item -> getTitle(), XNP_ITEM_TITLE_LEN );
4281              strncpy2( (char*)keywords, item -> getKeywords(), XNP_ITEM_KEYWORDS_LEN );              strncpy2( (char*)keywords, item -> getKeywords(), XNP_ITEM_KEYWORDS_LEN );
4282              strncpy2( (char*)description, item -> getDescription(), XNP_ITEM_DESCRIPTION_LEN );              strncpy2( (char*)description, item -> getDescription(), XNP_ITEM_DESCRIPTION_LEN );

Legend:
Removed from v.1.118  
changed lines
  Added in v.1.119

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26