Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | const-correctness tweak in db_text(). |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | json-multitag-test | json |
| Files: | files | file ages | folders |
| SHA1: |
30431ff9035a78713f1171ce9329e824 |
| User & Date: | stephan 2011-10-05 03:32:18.400 |
Context
|
2011-10-05
| ||
| 05:41 | Tweaks to the JS API, mainly to simplify a common 2-callbacks-per-event use case. Added missing json2.js. check-in: cf10d9d9b9 user: stephan tags: json-multitag-test, json | |
| 03:32 | const-correctness tweak in db_text(). check-in: 30431ff903 user: stephan tags: json-multitag-test, json | |
| 02:41 | Doh... accidentally changed resultCodes from strings to ints during refactoring. check-in: 36384da861 user: stephan tags: json-multitag-test, json | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
576 577 578 579 580 581 582 | /* ** Execute a query. Return the first column of the first row ** of the result set as a string. Space to hold the string is ** obtained from malloc(). If the result set is empty, return ** zDefault instead. */ | | | 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 |
/*
** Execute a query. Return the first column of the first row
** of the result set as a string. Space to hold the string is
** obtained from malloc(). If the result set is empty, return
** zDefault instead.
*/
char *db_text(char const *zDefault, const char *zSql, ...){
va_list ap;
Stmt s;
char *z;
va_start(ap, zSql);
db_vprepare(&s, 0, zSql, ap);
va_end(ap);
if( db_step(&s)==SQLITE_ROW ){
|
| ︙ | ︙ |