Changeset 3571
- Timestamp:
- Mar 30, 2005, 1:25:18 PM (21 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
astronomy/psDB.c (modified) (12 diffs)
-
dataIO/psDB.c (modified) (12 diffs)
-
db/psDB.c (modified) (12 diffs)
-
fileUtils/psDB.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psDB.c
r3567 r3571 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03-30 23: 07:45$14 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-30 23:25:18 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 217 217 MYSQL_ROW row; // single row of db result set 218 218 char *query; // SQL query 219 psU64rowCount; // number of rows in db result set220 psU64dataSize; // size of field219 my_ulonglong rowCount; // number of rows in db result set 220 unsigned long dataSize; // size of field 221 221 unsigned int fieldCount; // number of fields in db result set 222 222 psArray *column = NULL; // return array … … 250 250 } 251 251 252 rowCount = (psU64)mysql_num_rows(result);252 rowCount = mysql_num_rows(result); 253 253 254 254 // pre-allocate enough elements to hold the complete result set … … 261 261 // get the first element of lengths array that is part of the 262 262 // result set 263 dataSize = (psU64)*mysql_fetch_lengths(result);263 dataSize = *(mysql_fetch_lengths(result)); 264 264 265 265 // represent NULL as an empty string … … 372 372 MYSQL_FIELD *field; // field type info 373 373 char *query; // SQL query 374 psU64rowCount; // number of rows in db result set375 psU64fieldCount; // number of fields in db result set376 long*fieldLength; // field sizes374 my_ulonglong rowCount; // number of rows in db result set 375 unsigned int fieldCount; // number of fields in db result set 376 unsigned long *fieldLength; // field sizes 377 377 long len; // field length 378 378 psArray *resultSet; // return array … … 413 413 } 414 414 415 rowCount = (psU64)mysql_num_rows(result);415 rowCount = mysql_num_rows(result); 416 416 417 417 // pre-allocate enough elements to hold the complete result set … … 497 497 MYSQL_STMT *stmt; // prepared db statement 498 498 MYSQL_BIND *bind; // field values to insert 499 psU32paramCount; // number of placeholders in query499 unsigned long paramCount; // number of placeholders in query 500 500 psU64 j; // row index 501 501 … … 528 528 529 529 // how many place holders are in our query 530 paramCount = (psU32)mysql_stmt_param_count(stmt);530 paramCount = mysql_stmt_param_count(stmt); 531 531 532 532 // structure larger enough to hold one field of data per place holder … … 591 591 MYSQL_RES *result; 592 592 MYSQL_FIELD *field; 593 psU32fieldCount;593 unsigned int fieldCount; 594 594 psMetadata *table; 595 595 psU32 pType; 596 psU32i;596 unsigned int i; 597 597 psPtr column; 598 598 … … 642 642 char *query; 643 643 MYSQL_STMT *stmt; // prepared db statement 644 psU32paramCount; // number of placeholders in query644 unsigned long paramCount; // number of placeholders in query 645 645 MYSQL_BIND *bind; // field values to insert 646 psU64rowsAffected; // number of rows affected by query646 my_ulonglong rowsAffected; // number of rows affected by query 647 647 648 648 query = psDBGenerateUpdateRowSQL(tableName, where, values); … … 670 670 671 671 // how many place holders are in our query 672 paramCount = (psU32)mysql_stmt_param_count(stmt);672 paramCount = mysql_stmt_param_count(stmt); 673 673 674 674 // structure large enough to hold one field of data per place holder … … 713 713 mysql_commit(dbh->mysql); 714 714 715 rowsAffected = (psU64)mysql_stmt_affected_rows(stmt);715 rowsAffected = mysql_stmt_affected_rows(stmt); 716 716 717 717 mysql_stmt_close(stmt); -
trunk/psLib/src/dataIO/psDB.c
r3567 r3571 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03-30 23: 07:45$14 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-30 23:25:18 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 217 217 MYSQL_ROW row; // single row of db result set 218 218 char *query; // SQL query 219 psU64rowCount; // number of rows in db result set220 psU64dataSize; // size of field219 my_ulonglong rowCount; // number of rows in db result set 220 unsigned long dataSize; // size of field 221 221 unsigned int fieldCount; // number of fields in db result set 222 222 psArray *column = NULL; // return array … … 250 250 } 251 251 252 rowCount = (psU64)mysql_num_rows(result);252 rowCount = mysql_num_rows(result); 253 253 254 254 // pre-allocate enough elements to hold the complete result set … … 261 261 // get the first element of lengths array that is part of the 262 262 // result set 263 dataSize = (psU64)*mysql_fetch_lengths(result);263 dataSize = *(mysql_fetch_lengths(result)); 264 264 265 265 // represent NULL as an empty string … … 372 372 MYSQL_FIELD *field; // field type info 373 373 char *query; // SQL query 374 psU64rowCount; // number of rows in db result set375 psU64fieldCount; // number of fields in db result set376 long*fieldLength; // field sizes374 my_ulonglong rowCount; // number of rows in db result set 375 unsigned int fieldCount; // number of fields in db result set 376 unsigned long *fieldLength; // field sizes 377 377 long len; // field length 378 378 psArray *resultSet; // return array … … 413 413 } 414 414 415 rowCount = (psU64)mysql_num_rows(result);415 rowCount = mysql_num_rows(result); 416 416 417 417 // pre-allocate enough elements to hold the complete result set … … 497 497 MYSQL_STMT *stmt; // prepared db statement 498 498 MYSQL_BIND *bind; // field values to insert 499 psU32paramCount; // number of placeholders in query499 unsigned long paramCount; // number of placeholders in query 500 500 psU64 j; // row index 501 501 … … 528 528 529 529 // how many place holders are in our query 530 paramCount = (psU32)mysql_stmt_param_count(stmt);530 paramCount = mysql_stmt_param_count(stmt); 531 531 532 532 // structure larger enough to hold one field of data per place holder … … 591 591 MYSQL_RES *result; 592 592 MYSQL_FIELD *field; 593 psU32fieldCount;593 unsigned int fieldCount; 594 594 psMetadata *table; 595 595 psU32 pType; 596 psU32i;596 unsigned int i; 597 597 psPtr column; 598 598 … … 642 642 char *query; 643 643 MYSQL_STMT *stmt; // prepared db statement 644 psU32paramCount; // number of placeholders in query644 unsigned long paramCount; // number of placeholders in query 645 645 MYSQL_BIND *bind; // field values to insert 646 psU64rowsAffected; // number of rows affected by query646 my_ulonglong rowsAffected; // number of rows affected by query 647 647 648 648 query = psDBGenerateUpdateRowSQL(tableName, where, values); … … 670 670 671 671 // how many place holders are in our query 672 paramCount = (psU32)mysql_stmt_param_count(stmt);672 paramCount = mysql_stmt_param_count(stmt); 673 673 674 674 // structure large enough to hold one field of data per place holder … … 713 713 mysql_commit(dbh->mysql); 714 714 715 rowsAffected = (psU64)mysql_stmt_affected_rows(stmt);715 rowsAffected = mysql_stmt_affected_rows(stmt); 716 716 717 717 mysql_stmt_close(stmt); -
trunk/psLib/src/db/psDB.c
r3567 r3571 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03-30 23: 07:45$14 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-30 23:25:18 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 217 217 MYSQL_ROW row; // single row of db result set 218 218 char *query; // SQL query 219 psU64rowCount; // number of rows in db result set220 psU64dataSize; // size of field219 my_ulonglong rowCount; // number of rows in db result set 220 unsigned long dataSize; // size of field 221 221 unsigned int fieldCount; // number of fields in db result set 222 222 psArray *column = NULL; // return array … … 250 250 } 251 251 252 rowCount = (psU64)mysql_num_rows(result);252 rowCount = mysql_num_rows(result); 253 253 254 254 // pre-allocate enough elements to hold the complete result set … … 261 261 // get the first element of lengths array that is part of the 262 262 // result set 263 dataSize = (psU64)*mysql_fetch_lengths(result);263 dataSize = *(mysql_fetch_lengths(result)); 264 264 265 265 // represent NULL as an empty string … … 372 372 MYSQL_FIELD *field; // field type info 373 373 char *query; // SQL query 374 psU64rowCount; // number of rows in db result set375 psU64fieldCount; // number of fields in db result set376 long*fieldLength; // field sizes374 my_ulonglong rowCount; // number of rows in db result set 375 unsigned int fieldCount; // number of fields in db result set 376 unsigned long *fieldLength; // field sizes 377 377 long len; // field length 378 378 psArray *resultSet; // return array … … 413 413 } 414 414 415 rowCount = (psU64)mysql_num_rows(result);415 rowCount = mysql_num_rows(result); 416 416 417 417 // pre-allocate enough elements to hold the complete result set … … 497 497 MYSQL_STMT *stmt; // prepared db statement 498 498 MYSQL_BIND *bind; // field values to insert 499 psU32paramCount; // number of placeholders in query499 unsigned long paramCount; // number of placeholders in query 500 500 psU64 j; // row index 501 501 … … 528 528 529 529 // how many place holders are in our query 530 paramCount = (psU32)mysql_stmt_param_count(stmt);530 paramCount = mysql_stmt_param_count(stmt); 531 531 532 532 // structure larger enough to hold one field of data per place holder … … 591 591 MYSQL_RES *result; 592 592 MYSQL_FIELD *field; 593 psU32fieldCount;593 unsigned int fieldCount; 594 594 psMetadata *table; 595 595 psU32 pType; 596 psU32i;596 unsigned int i; 597 597 psPtr column; 598 598 … … 642 642 char *query; 643 643 MYSQL_STMT *stmt; // prepared db statement 644 psU32paramCount; // number of placeholders in query644 unsigned long paramCount; // number of placeholders in query 645 645 MYSQL_BIND *bind; // field values to insert 646 psU64rowsAffected; // number of rows affected by query646 my_ulonglong rowsAffected; // number of rows affected by query 647 647 648 648 query = psDBGenerateUpdateRowSQL(tableName, where, values); … … 670 670 671 671 // how many place holders are in our query 672 paramCount = (psU32)mysql_stmt_param_count(stmt);672 paramCount = mysql_stmt_param_count(stmt); 673 673 674 674 // structure large enough to hold one field of data per place holder … … 713 713 mysql_commit(dbh->mysql); 714 714 715 rowsAffected = (psU64)mysql_stmt_affected_rows(stmt);715 rowsAffected = mysql_stmt_affected_rows(stmt); 716 716 717 717 mysql_stmt_close(stmt); -
trunk/psLib/src/fileUtils/psDB.c
r3567 r3571 12 12 * @author Joshua Hoblitt 13 13 * 14 * @version $Revision: 1.1 1$ $Name: not supported by cvs2svn $15 * @date $Date: 2005-03-30 23: 07:45$14 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2005-03-30 23:25:18 $ 16 16 * 17 17 * Copyright 2005 Joshua Hoblitt, University of Hawaii … … 217 217 MYSQL_ROW row; // single row of db result set 218 218 char *query; // SQL query 219 psU64rowCount; // number of rows in db result set220 psU64dataSize; // size of field219 my_ulonglong rowCount; // number of rows in db result set 220 unsigned long dataSize; // size of field 221 221 unsigned int fieldCount; // number of fields in db result set 222 222 psArray *column = NULL; // return array … … 250 250 } 251 251 252 rowCount = (psU64)mysql_num_rows(result);252 rowCount = mysql_num_rows(result); 253 253 254 254 // pre-allocate enough elements to hold the complete result set … … 261 261 // get the first element of lengths array that is part of the 262 262 // result set 263 dataSize = (psU64)*mysql_fetch_lengths(result);263 dataSize = *(mysql_fetch_lengths(result)); 264 264 265 265 // represent NULL as an empty string … … 372 372 MYSQL_FIELD *field; // field type info 373 373 char *query; // SQL query 374 psU64rowCount; // number of rows in db result set375 psU64fieldCount; // number of fields in db result set376 long*fieldLength; // field sizes374 my_ulonglong rowCount; // number of rows in db result set 375 unsigned int fieldCount; // number of fields in db result set 376 unsigned long *fieldLength; // field sizes 377 377 long len; // field length 378 378 psArray *resultSet; // return array … … 413 413 } 414 414 415 rowCount = (psU64)mysql_num_rows(result);415 rowCount = mysql_num_rows(result); 416 416 417 417 // pre-allocate enough elements to hold the complete result set … … 497 497 MYSQL_STMT *stmt; // prepared db statement 498 498 MYSQL_BIND *bind; // field values to insert 499 psU32paramCount; // number of placeholders in query499 unsigned long paramCount; // number of placeholders in query 500 500 psU64 j; // row index 501 501 … … 528 528 529 529 // how many place holders are in our query 530 paramCount = (psU32)mysql_stmt_param_count(stmt);530 paramCount = mysql_stmt_param_count(stmt); 531 531 532 532 // structure larger enough to hold one field of data per place holder … … 591 591 MYSQL_RES *result; 592 592 MYSQL_FIELD *field; 593 psU32fieldCount;593 unsigned int fieldCount; 594 594 psMetadata *table; 595 595 psU32 pType; 596 psU32i;596 unsigned int i; 597 597 psPtr column; 598 598 … … 642 642 char *query; 643 643 MYSQL_STMT *stmt; // prepared db statement 644 psU32paramCount; // number of placeholders in query644 unsigned long paramCount; // number of placeholders in query 645 645 MYSQL_BIND *bind; // field values to insert 646 psU64rowsAffected; // number of rows affected by query646 my_ulonglong rowsAffected; // number of rows affected by query 647 647 648 648 query = psDBGenerateUpdateRowSQL(tableName, where, values); … … 670 670 671 671 // how many place holders are in our query 672 paramCount = (psU32)mysql_stmt_param_count(stmt);672 paramCount = mysql_stmt_param_count(stmt); 673 673 674 674 // structure large enough to hold one field of data per place holder … … 713 713 mysql_commit(dbh->mysql); 714 714 715 rowsAffected = (psU64)mysql_stmt_affected_rows(stmt);715 rowsAffected = mysql_stmt_affected_rows(stmt); 716 716 717 717 mysql_stmt_close(stmt);
Note:
See TracChangeset
for help on using the changeset viewer.
