/usr/bin/ld: .dub/obj/TrailDB.o: relocation R_X86_64_32 against symbol
_D9Exception7__ClassZ' can not be used when making a shared object; recompile with -fPIC`
-fPIC
flag: http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html. dmd calls gcc and perhaps supplies the -fPIC
flag automatically, while perhaps ldc does not?
ctypes
/ cffi
in Python, if you want to give it a try
tdb_cons_open
always creates a new, empty tdb. If you want to add previous events to a new tdb, open the second tdb with a different name and use tdb_cons_append
to add the events of a.tdb
there
Hi, @tuulos thinks for help!
I had overviewed api in https://github.com/traildb/traildb/blob/master/doc/docs/api.md. these are tdb_multi_cursor_(new|free|reset)
and tdb_multi_cursor_next
and tdb_multi_cursor_next_batch
.the *next*
method is returning events.So if i terating over a single primary key,I have to merge it on visitor_id first,just like:
visitormap = {}
for(event in cursor){
visitorid = event.key
visitormap[visitorid] = append(visitormap[visitorid],event)
}
// THEN do work
for((visitorid,events) in visitormap){
// DO SOME WORK
}
So I need to iter the data one time and hold it.It takes time and space.
Is it a better way to do such thing ?