Login
All files named ”include/fossil-scm/fossil-db.h”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for include/fossil-scm/fossil-db.h

2021-12-21
20:21
Renamed to include/fossil-scm/db.h. Removed the fossil- name prefix from include/fossil-scm/*.h. check-in: [43a9bea8d5] user: stephan branch: trunk, size: 0
2021-12-14
15:52
More work on the merge port and adjacent code. file: [1e214de45d] check-in: [b9c2a05cfe] user: stephan branch: trunk, size: 68417
04:17
Tweaks to the return semantics of fsl_db_exec() and fsl_stmt_step(). Doesn't/shouldn't affect any existing code. Added a test to ensure that fsl_stmt_step() behaves as expected in the face of a RETURNING clause. file: [fd97437ec6] check-in: [ad7ef26207] user: stephan branch: trunk, size: 68362
2021-12-10
04:08
Initial version of f-repostat, analog to (fossil dbstat). Some adjecent constness cleanups. file: [7b1f67e9b9] check-in: [4926ae9b31] user: stephan branch: trunk, size: 67825
2021-12-03
06:23
Moved most of the fsl_cx-specific code out of fsl_db and into the new src/udf.c. file: [bc905774ed] check-in: [84a59c6833] user: stephan branch: trunk, size: 67621
2021-11-30
17:24
Added fsl_db-level internal infrastructure to be able to catch the a potential OOM worked around in [11a6a98c81d1] and report it properly. Updated that fix to use the new infrastructure and distinguish between real and fake OOM. file: [3b6c6f0db6] check-in: [17cc186e16] user: stephan branch: trunk, size: 67734
2021-11-18
07:58
More work on fsl_repo_rebuild(). It seems to work, with the caveat that ticket crosslinking is mostly unimplemented (and will remain so for the foreseeable future), but it's dog, dog slow (about 1/10th of fossil's speed). Needs more testing before moving from f-rebuild.c into the library. file: [11e97715f5] check-in: [ae8d020e4f] user: stephan branch: trunk, size: 67500
2021-11-09
11:48
When detaching a db role, finalize any cached statements which are known (or believed) to be mapped to that role to avoid that detaching fails due to a lock held by opened statements. file: [a0b93dc1fb] check-in: [d00587179e] user: stephan branch: trunk, size: 67498
2021-10-21
17:42
A pile of constness and char-as-bool tweaks in the db API. file: [e66f11171f] check-in: [d571c6f692] user: stephan branch: trunk, size: 66970
04:41
Reduced fsl_buffer_reserve() calls by about 90% for f-parseparty (2.8m down to 300k), largely via addition of a db-level buffer for cached SQL preparation. Added a simpl hash to cached fsl_stmt instances to speed up fsl_db_prepare_cached() and reduce fsl_buffer_cmp() calls by 90%+. Record how many times any given caches fsl_stmt is reused and emit that via the new fcli_dump_stmt_cache() function. This reduces f-sanity allocations from 39k to 29k but slightly increases total allocated memory. file: [5e8967297c] check-in: [c812573f26] user: stephan branch: trunk, size: 67509
2021-10-18
14:03
Numerous minor doc and constness tweaks. Starting to use markdown formatting for API docs, now that it's been discovered that Doxygen can do that. file: [62f4fda75a] check-in: [77e8ee40f8] user: stephan branch: trunk, size: 67141
12:07
Changed signature of fsl_db_close() to return void. Removed some dead code. file: [1ee529429e] check-in: [0c32e3185e] user: stephan branch: trunk, size: 67197
10:02
Random doc updates and moved an enum from fossil-util.h to fossil-db.h. file: [051a5a3c2f] check-in: [f069532a71] user: stephan branch: port-merge, size: 67187
2021-10-16
15:50
Another few hundred lines of merge infrastructure and lots of unrelated constness tweaks. Moving to a branch because we can't test some of the new features without one. file: [eb31b48b3f] check-in: [3ff20f1d01] user: stephan branch: port-merge, size: 65307
2021-10-02
18:12
More work on the annotate interface, plus far too many nearby-yet-unrelated tweaks such as costness changes. file: [c7a15545f6] check-in: [b601f20cff] user: stephan branch: trunk, size: 65076
2021-04-13
07:33
More work on the fsl_deck_derive()-related bits. Internal API modernization in fsl_content_put_ex(). file: [32e082be55] check-in: [64b07ff5a8] user: stephan branch: deck-reworking, size: 64851
2021-03-31
05:41
Minor f-apps updates. Reverted f-revert to using the filename variant of fsl_ckout_revert(), instead of the fsl_filename_to_vfile_ids() variant, because the former allows the user to revert renames using the old or new names, whereas the latter only sees the new names. Fixed a range error in fsl_stmt_bind_fmtv() when binding a string as blob, and that function's blob/string bindings no longer copy their arguments' memory. Changed fsl_stmt_bind_step() return semantics to enable fetching data. file: [f81f2fb938] check-in: [43d1902823] user: stephan branch: trunk, size: 64859
2021-03-20
21:00
Added fsl_stmt_bind_step() and fixed a bogus return in fsl_stmt_bind_fmt(). file: [1ea2585792] check-in: [84a2e6b8f1] user: stephan branch: trunk, size: 63786
2021-03-19
05:19
Added fsl_ckout_write_manifest() to optionally write out the (manifest, manifest.uuid, manifest.tags) files for a checkout. fsl_ckout_calc_update_version(): removed the preferLatest parameter and it now reports the list of ambiguous candidates in its error string. file: [b427e9942e] check-in: [07fd8c1f33] user: stephan branch: trunk, size: 63270
2021-03-15
04:25
Globally renamed _checkout to _ckout, as some of these names are getting a bit long. file: [5070acbe64] check-in: [bc9e88ee2c] user: stephan branch: trunk, size: 63232
2021-03-12
17:26
Completely reworked how fsl_cx manages scratch buffers but it's leading, rather inexplicably, to double the number of allocs and memory use in f-sanity. Checking in due to paranoia of losing this work. file: [337b3881da] check-in: [01c1cff578] user: stephan branch: cx-scratchpad-rework, size: 63232
2021-03-08
13:23
Renamed FSL_CANSWER_xxx to FSL_CRESPONSE_xxx. Changed some queries from cached to non-cached. Added /*__func__()*/ to the end of many queries to make them easy to track down via sqlite trace output. file: [3dd5a0c985] check-in: [c8b25fe30f] user: stephan branch: trunk, size: 62462
2021-03-05
07:43
More char-to-bool conversions. Moved fsl_stmt_bind_fmt() into the public API and added a basic test for it. file: [f068a342c9] check-in: [d386e0d741] user: stephan branch: trunk, size: 62429
2021-03-04
17:45
f-open: removed unnecessary content load and added some library-level functions to help streamline transaction handling. file: [4f4e9fde5e] check-in: [5c988bf424] user: stephan branch: trunk, size: 61240
14:27
Added FSL_RC_MISSING_INFO. Minor internal doc cleanups and API result value changes. Reworked how fsl_cx_hash_buffer() returns when its alternative hash option conflicts with the current hash policy. file: [c2aa381569] check-in: [d1428d5a93] user: stephan branch: trunk, size: 61240
2021-03-03
08:38
Lots of bending and hammering related to smoothing out f-open. There's still an issue when opening an empty checkout (it's seen as not a checkout by other apps), but that's on the to-fix list. file: [0d22816fce] check-in: [2a04a6818c] user: stephan branch: trunk, size: 60978
2021-03-01
16:21
Arguably a typo fix in the new header. Thank goodness for stream editors. file: [84ae1a31cf] check-in: [386316db07] user: stephan branch: trunk, size: 60984
15:46
Replaced the overwhelming majority of license headers with the new project-standard one. Left a few as they were for files which were imported essentially unchanged from Fossil or, in the case of SHA1/SHA3/MD5 bits, other 3rd-party sources. file: [a3f0f41a09] check-in: [fa5fb24496] user: stephan branch: trunk, size: 60976
2021-02-26
06:03
Some doc touchups, enum renaming, and removed some dead code. file: [498ecfef3f] check-in: [473fd8718c] user: stephan branch: trunk, size: 61217
04:57
A workaround for the plink count mismatch between libf/fossil crosslinking. This gets the plink counts correct (fixing fossil's ability to run 'blame'), but why this workaround is needed is unclear. A couple char-to-bool API conversions. file: [e75d8857c0] check-in: [a9332967a7] user: stephan branch: trunk, size: 61217
2021-02-21
16:52
Ported in fsl_search_doc_touch() from fossil and call it at the appropriate points in the crosslinking steps, but it's disabled because one of the queries mysteriously fails with 'SQL logic error' when run from this context (but works fine in the fossil shell). Some more char-to-bool conversions. file: [dc0950e764] check-in: [5a3d4bceb3] user: stephan branch: trunk, size: 61229
2021-02-18
05:11
Replaced the extraneous fsl_double_t typedef with double. file: [ff0149b354] check-in: [b359548620] user: stephan branch: trunk, size: 61228
2021-02-14
12:36
Started replacing some of the char-as-bool with C99 bool. file: [1f44a13cad] check-in: [4da3578966] user: stephan branch: trunk, size: 61294
2021-02-12
22:09
libfossil is now C99, rather than C89, per discussion at [https://fossil.wanderinghorse.net/r/libfossil-forum/forumpost/e02ff0e8d0]. fsl_int{16,32,64}_t have been replaced by the standard uint{16,32,64}_t, FSL_xxx_T_PFMT/SFMT replaced with PRIx32 and friends, and auto.def now checks for -std=c99 capability (but that check could probably be done differently/improved). fsl_int_t and fsl_uint_t are retained, as they're more about documentation/intent than fixed sizes. file: [5c928f9afc] check-in: [ee070353b9] user: stephan branch: trunk, size: 61290
15:22
Implemented crosslink begin/end steps, minus still-pending ticket/wiki-specific features. Crosslinking wiki pages updated to use fossil's newer wiki timeline comment format and updated f-timeline to recognize it as well. file: [b45733f883] check-in: [31c8bddf22] user: stephan branch: trunk, size: 61354
07:02
Implemented forum artifact crosslinking and restructured fsl_deck_crosslink() into internal type-specific routines. file: [a7fded85d9] check-in: [1817557652] user: stephan branch: trunk, size: 61021
2021-02-09
00:18
Updated license text in almost all C/H to claim copyright while attributing all of the files as heavily derived from DRH's work. file: [0e0868ea89] check-in: [631fb3f69a] user: stephan branch: trunk, size: 60715
2021-02-07
14:31
Globally replaced http://... URLs with https://.... Most of them probably still work, too. file: [dc3f2b772f] check-in: [6af7b3b7c8] user: stephan branch: trunk, size: 60656
2014-10-27
20:42
Switched from :memory: to "" (temp) DB for the main db, other minor cleanups. file: [87a3705e23] check-in: [6c18a25f11] user: stephan branch: trunk, size: 60653
2014-10-01
07:20
marked as FSL_EXPORT all other symbols in public api (pretty much everything). I stopped short of doing things in fossil-internal.h, because I think that is a private header. There are a couple things in there that are exported, because the test apps required them, but I'm going to leave that header alone for now. Changes in this change set reflect methods that are not referenced by any of the test apps, and maybe need some test cases generated. file: [19c7db3c24] check-in: [bd0a181022] user: dave branch: feech-dave-msvcsupport001, size: 60430
06:15
marked as FSL_EXPORT various symbols; this change set is limited to the ones that are needed by the various f-apps, but this is not complete for general use of the library. I am doing this change in two phases simply because it gives me a way to see what methods have been exercised (by f-apps) and which have not. file: [25d5c12cc3] check-in: [7b651689f3] user: dave branch: feech-dave-msvcsupport001, size: 59579
2014-08-26
16:52
refactored fsl_db prepared stmt cache to be a linked list instead of dynamic array. file: [b09be1262f] check-in: [961a6464a7] user: stephan branch: trunk, size: 59245
2014-07-24
17:05
Reformatted, now that i have finally taught emacs to stop indenting for the C++-mode extern "C" block. file: [19fddf9121] check-in: [dd07d92271] user: stephan branch: trunk, size: 59049
16:48
Minor error handling tweaks in fsl_db_prepare(). file: [6d34026692] check-in: [d4ef5d233a] user: stephan branch: trunk, size: 62659
2014-04-22
20:11
Added an sqlite3 commit hook to abort the app if COMMIT is used while an API-controlled transaction is in progress. Added a fsl_str_is_date2() test which should have been in the previous commit. file: [a19862f099] check-in: [83c08406ea] user: stephan branch: trunk, size: 62536
2014-03-29
10:09
Introducing the highly arguable fsl_simplify_sql() utility routine. file: [37fb362cb4] check-in: [7b0022b9a5] user: stephan branch: trunk, size: 62537
2014-03-22
11:54
added fsl_db_changes_recent/total(). file: [a61d6d31ab] check-in: [864de83096] user: stephan branch: trunk, size: 62663
2014-03-19
18:59
Got most of the fsl::Stmt class in place and compiling. Still untested. file: [44281b0a1b] check-in: [4f2a0650ae] user: stephan branch: trunk, size: 61825
2014-03-14
11:10
another round of minor cleanups. file: [579c13ea6d] check-in: [7e8d0ecfe2] user: stephan branch: trunk, size: 61623
2014-03-08
22:21
More work on the checkin bits. Reimplemented how baseline manifests get their F-cards calculated. Not yet sure how best to implement a delta manifest. file: [fb7a4b44ca] check-in: [1cd70042f1] user: stephan branch: trunk, size: 61571
2014-03-05
19:28
Doc update. file: [ff4af5b314] check-in: [68b59e99af] user: stephan branch: trunk, size: 61224
2014-02-23
11:24
fsl_mtime_of_manifest_file() now accepts a 0 fileId to fetch the time of the manifest. zip-repo now sets the root dir time to that of the manifest. file: [06a0b1c64a] check-in: [90f3f7bd40] user: stephan branch: trunk, size: 61062
2014-02-20
21:20
Expanded the db API and script bindings a bit. Unit test tweaks. file: [5df4df6f9f] check-in: [d74cd1950d] user: stephan branch: trunk, size: 61063
2014-02-14
18:18
added fsl_db_name(). file: [840ab8f47b] check-in: [a8c452c767] user: stephan branch: trunk, size: 60661
09:05
Globally changes the API docs from fossil/sqlite-style '**' to Doxygen-friendly format because the extra stars hinder writability/changability and require an extra filter at the doxygen-processing level. file: [b63f074350] check-in: [a2cbd2e343] user: stephan branch: trunk, size: 60447
2014-02-10
18:09
Some reworking of how trailing slashes are handled in fsl_checkout_filename_check(), fsl_cx_stat(), and friends. As a general rule, trailing slashes are kept if present because this vastly simplifies handling of input from the CLI, but is up for debate (or a flag parameter) because it will probably lead to workarounds later on. file: [cd8664f1a8] check-in: [5bf66bef9e] user: stephan branch: trunk, size: 61074
16:23
Fixed a couple minor inconsistencies in the no-row-found handling for fsl_db_get_(text|blob)(). file: [a945be3b03] check-in: [7fcdf4f35a] user: stephan branch: trunk, size: 61045
2014-02-05
20:49
Replaced a couple gratuitous structs with (char *). Other minor tinkering. file: [d2f16b1055] check-in: [a94b263ba1] user: stephan branch: trunk, size: 60584
19:19
insignificant tweaks. file: [7d5542247e] check-in: [508e3992c5] user: stephan branch: trunk, size: 60810
2014-01-30
20:36
Re-thought/implemented fsl_repo_dir_names() to return all dir names when given an RID, use the checkout if rid==0, and all versions if rid is negative. Other minor refactoring/renaming. Fixed fsl_cx_filename_collation() to return the right string. file: [8251aee091] check-in: [22ce993a61] user: stephan branch: trunk, size: 60620
2014-01-26
13:18
More tinkering with the config bits. fsl_config_open() can now initialize an empty db. Started adding basic f-config app. file: [6f4674fd41] check-in: [9e72b41cdc] user: stephan branch: trunk, size: 60467
2014-01-24
19:45
doc patches to accound for the doxygen filtering kludge needed for @code blocks. file: [3d8c8df6ab] check-in: [95be6cf5b2] user: stephan branch: trunk, size: 60256
2013-09-24
15:30
doc and error reporting tweaks. file: [94a00cfe18] check-in: [81b1ef6e09] user: stephan branch: trunk, size: 60257
2013-09-19
17:02
minor doc rewording. file: [8e9b2faf01] check-in: [4449223605] user: stephan branch: trunk, size: 56778
16:03
Added FSL_DIRPART() SQL func. Fixed behaviour of fsl_db_prepare() when input SQL evaluates to NULL (it now fails instead of succeeding with a NULL stmt handle). file: [f80d1f91b2] check-in: [8dc89b848b] user: stephan branch: trunk, size: 56755
2013-09-10
17:35
fsl_deck_parse() now theoretically needs no fsl_cx, but it is untested in that configuration. file: [362a667a05] check-in: [0cd2dffff4] user: stephan branch: trunk, size: 56572
2013-09-09
18:32
Added fsl_iso8601_to_julian(). Minor doc updates. file: [0f8e885899] check-in: [479a7c897f] user: stephan branch: trunk, size: 56350
2013-09-08
17:40
Added SQL functions: FSL_USER(), FSL_CONTENT(), FSL_SYM2RID(). Undid part of the previous fsl_buffer_compress() optimization because it cannot help us much for the real use cases and complicates the code. More proactive int casting for va_list bits. file: [07c440635f] check-in: [f9e0b1801f] user: stephan branch: trunk, size: 56258
15:39
Lots of minor additions and tweaks, mainly in support of app-level code. file: [5a91f830bc] check-in: [7bfbc3dba6] user: stephan branch: trunk, size: 55341
2013-09-07
11:58
another round of API renaming. file: [9b456eec9a] check-in: [200d1cd898] user: stephan branch: trunk, size: 54579
2013-08-31
13:02
Doc additions, minor error reporting cleanups. file: [5b4b5013c6] check-in: [8f05724070] user: stephan branch: trunk, size: 53846
2013-08-29
17:19
Moved SQL tracing from stderr back to stdout, so that redirection and flushing get the SQL output lined up with the app output. Renamed FSL_ATYPE_G to FSL_ATYPE_TAG. Aligned the FSL_ATYPE_xxx values with their FSL_CATYPE_xxx partners. Fixed a fsl_atype_t/fsl_catype_t mixup in f-ls (thanks, clang). file: [239cdb482c] check-in: [98b8da1754] user: stephan branch: trunk, size: 52709
16:34
Added: Split the 300kb+ of headers/docs into multiple files because my old netbook is starting to choke on syntax-highlighting them (and on the large resulting doxygen pages). file: [cb5c5d10c9] check-in: [93ec815614] user: stephan branch: trunk, size: 52709