Changeset 3158
- Timestamp:
- Feb 7, 2005, 10:57:20 PM (21 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (2 diffs)
-
psLibSDRS.tex (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r3155 r3158 1 %%% $Id: ChangeLogSDRS.tex,v 1.6 2 2005-02-08 04:56:24 eugeneExp $1 %%% $Id: ChangeLogSDRS.tex,v 1.63 2005-02-08 08:57:20 jhoblitt Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 451 451 \item added the function psMetadataAddV 452 452 \item added the option flags \code{psMetadataFlags} 453 \end{itemize} 453 \item changed psDBDumpCols() to return a psMetadata (bug 285) 454 \item changed psDB to hold a MYSQL * 455 \item changed psDBSelectColumnNum() to accept a psElemType parameter 456 \item changed psDBSelectColumn() to return an psArray of strings 457 \item renamed psDBUpdateRow() to psDBUpdateRows() 458 \item renamed psDBDeleteRow() to psDBDeleteRows() 459 \item renamed psDBInsertRow() to psDBInsertOneRow() 460 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r3155 r3158 1 %%% $Id: psLibSDRS.tex,v 1.17 4 2005-02-08 04:56:24 eugeneExp $1 %%% $Id: psLibSDRS.tex,v 1.175 2005-02-08 08:57:20 jhoblitt Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 4320 4320 \begin{verbatim} 4321 4321 typedef struct { 4322 MYSQL mysql;4322 MYSQL *mysql; 4323 4323 } psDB; 4324 4324 \end{verbatim} … … 4398 4398 \begin{verbatim} 4399 4399 psArray *psDBSelectColumn(psDB *dbh, const char *tableName, const char *col, const psU64 limit); 4400 psVector *psDBSelectColumnNum(psDB *dbh, const char *tableName, const char *col, const psU64 limit); 4401 \end{verbatim} 4402 4403 These functions generates and executes the SQL needed to select an 4404 entire column from a table or up to \code{limit} rows from it. If 4405 \code{limit} is 0, the entire range is returned. The database 4406 response is processed and a \code{psArray} of elements of the native 4407 type is returned. The Num version of the function returns the data in 4408 a \code{psVector}. It returns an error (NULL) if the requested field 4409 is not a numerical type. 4400 psVector *psDBSelectColumnNum(psDB *dbh, const char *tableName, const char *col, psElemType pType, const psU64 limit); 4401 \end{verbatim} 4402 4403 These functions generates and executes the SQL needed to select an entire 4404 column from a table or up to \code{limit} rows from it. If \code{limit} is 0, 4405 the entire range is returned. The database response is processed and a 4406 \code{psArray} of strings is returned. The Num version of the function returns 4407 the data in a \code{psVector}, data cast to \code{pType}. It returns an error 4408 (NULL) if the requested field is not a numerical type. 4410 4409 4411 4410 \begin{verbatim} … … 4423 4422 4424 4423 \begin{verbatim} 4425 bool psDBInsert Row(psDB *dbh, const char *tableName, psMetadata *row);4424 bool psDBInsertOneRow(psDB *dbh, const char *tableName, psMetadata *row); 4426 4425 \end{verbatim} 4427 4426 … … 4437 4436 4438 4437 \begin{verbatim} 4439 psArray *psDBDumpCols(psDB *dbh, const char *tableName); 4440 \end{verbatim} 4441 4442 Fetch all columns as an psArray of psVector 4443 4444 \begin{verbatim} 4445 psU64 psDBUpdateRow(psDB *dbh, const char *tableName, psMetadata *where, psMetadata *values); 4438 psMetadata *psDBDumpCols(psDB *dbh, const char *tableName); 4439 \end{verbatim} 4440 4441 Fetch all columns, as either a psVector or a psArray depnding on whether or not 4442 the column is numeric, and return them in a psMetadata structure where 4443 psMetadataItem.name contains the column's name. 4444 4445 \begin{verbatim} 4446 psU64 psDBUpdateRows(psDB *dbh, const char *tableName, psMetadata *where, psMetadata *values); 4446 4447 \end{verbatim} 4447 4448 … … 4454 4455 4455 4456 \begin{verbatim} 4456 psU64 psDBDeleteRow (psDB *dbh, const char *tableName, psMetadata *where);4457 psU64 psDBDeleteRows(psDB *dbh, const char *tableName, psMetadata *where); 4457 4458 \end{verbatim} 4458 4459
Note:
See TracChangeset
for help on using the changeset viewer.
