canonical / dqlite

Embeddable, replicated and fault-tolerant SQL engine.
https://dqlite.io
Other
3.83k stars 216 forks source link

Client API usage example #470

Closed cole-miller closed 1 year ago

cole-miller commented 1 year ago

Don't merge this, pushing as a demonstration.

Compile and run the demo program like this:

make libdqlite.la
libtool --mode=compile gcc -c demo.c -o demo.lo
libtool --mode=link gcc libdqlite.la demo.lo -o demo
LIBDQLITE_TRACE=1 LIBRAFT_TRACE=1 libtool --mode=execute ./demo # or '... gdb ./demo'
codecov[bot] commented 1 year ago

Codecov Report

Merging #470 (1125065) into master (690818b) will increase coverage by 11.47%. The diff coverage is 15.11%.

:exclamation: Current head 1125065 differs from pull request most recent head 33afd19. Consider uploading reports for the commit 33afd19 to get more accurate results

@@             Coverage Diff             @@
##           master     #470       +/-   ##
===========================================
+ Coverage   58.86%   70.34%   +11.47%     
===========================================
  Files          33       34        +1     
  Lines        5915     6025      +110     
  Branches     1768     1940      +172     
===========================================
+ Hits         3482     4238      +756     
+ Misses       1366     1123      -243     
+ Partials     1067      664      -403     
Impacted Files Coverage Δ
src/client/easy.c 9.21% <9.21%> (ø)
src/client/protocol.c 48.16% <60.00%> (+14.50%) :arrow_up:
src/lib/fs.c 83.33% <0.00%> (ø)
src/lib/addr.c 71.42% <0.00%> (+2.07%) :arrow_up:
src/dqlite.c 84.84% <0.00%> (+3.03%) :arrow_up:
src/lib/serialize.h 85.48% <0.00%> (+3.22%) :arrow_up:
src/logger.c 4.16% <0.00%> (+4.16%) :arrow_up:
src/config.c 95.65% <0.00%> (+4.34%) :arrow_up:
src/registry.c 95.65% <0.00%> (+4.34%) :arrow_up:
src/lib/transport.c 91.42% <0.00%> (+5.71%) :arrow_up:
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.