417e7105d3
Import Sprout. This is to fix the build on clang.
...
Sprout is needed because pow, log2 and log10 are constexpr on gcc,
but that's nonstandard. Sprout provides the constexpr version of
those functions.
Also fix warnings. I still get plenty of warnings about some suggested
paretheses, but it seems to be a bug from clang. See
https://llvm.org/bugs/show_bug.cgi?id=21629 for the bug report.
2016-07-11 19:30:21 +01:00
d46cb322b9
Implement locate_in_db().
2016-07-11 18:38:08 +01:00
5566b81b45
Add a reset() method to batch.
2016-07-11 18:37:47 +01:00
645cf5858b
Implement find_all_sets.
2016-07-11 18:02:50 +01:00
bfdf849711
Implement delete_group.
2016-07-11 17:48:05 +01:00
dbd958daec
Recursively check for failures.
2016-07-11 17:47:28 +01:00
e3fa82006f
Fix off-by-one error.
...
Also use undordered_set instead of set.
2016-07-11 17:47:00 +01:00
e5007cf96f
Use GroupIDType and FileIDType instead of uint.
2016-07-11 17:46:08 +01:00
bd06158d4c
Store group id and file id instead of full keys.
2016-07-11 17:44:54 +01:00
62727d6831
Make sequence_bt more generic by taking the index type as well.
2016-07-11 16:45:46 +01:00
e70b137002
Fix sporadic failure in lexical_cast.
2016-07-11 16:45:24 +01:00
016f357704
Use boost::regex and implement delete_all_tags by regex.
...
std::regex doesn't understand the (?i) modifier, which makes it
throw an exception on regex generated by the frontend. I can't
change the frontend, or the postgre plugin would break... thankfully
boost comes to the rescue :)
2016-07-11 11:58:52 +01:00
83fe7c75d6
Implement delete all tags by id.
2016-07-10 17:15:45 +01:00
f12d498e40
Move split_tags to core.
2016-07-10 17:12:19 +01:00
4bd7c3515a
Improve lua scripts.
...
Now a "tags" field gets added to the file item. It contains a comma
separated sorted list of the tags to which the item belongs.
2016-07-10 16:52:20 +01:00
9423c4da73
Implement deleting tags by regex.
2016-07-10 14:13:41 +01:00
7451b8dc5d
Implement delete tag by id.
2016-07-10 14:10:39 +01:00
3d7632ef2c
Forgot to wait for batch to complete.
...
And batch was declared in the wrong place anyways -_-
2016-07-10 14:07:15 +01:00
77fb699ec2
Drop unneeded (and wrong) prototype.
2016-07-10 14:02:42 +01:00
de00a4b469
Add and load dele_tag_if_in_set Lua script.
2016-07-10 14:01:43 +01:00
af7443c48b
Implement tagging by regex.
2016-07-10 14:00:51 +01:00
9c2f1d7403
Move tagging by id into a separate file.
2016-07-10 13:59:45 +01:00
7b77913b49
Allow passing a pattern to *scan commands.
2016-07-10 13:57:16 +01:00
01d587b7da
Move redis range to record data struct into a separate file.
2016-07-10 13:56:46 +01:00
d6e95eac8e
Enable tagging by id in Redis backend.
2016-07-09 14:57:58 +01:00
446d173ad3
Fix broken static_assert.
2016-07-09 14:57:30 +01:00
75335cd390
Implement default ctor and move assignment in Script.
2016-07-08 21:36:50 +01:00
678e8c90d1
Revert "Load save and delete scripts upon connection to Redis."
...
This reverts commit 1aacca9e21
.
2016-07-08 21:35:31 +01:00
e92ee0cef0
Revert "Import ohm-scripts from soveran's repo."
...
This reverts commit fc4bec4e19
.
2016-07-08 21:33:01 +01:00
004ba83752
Fix find-by-hash function.
2016-07-08 21:32:09 +01:00
5b14823cb8
Implement storing scan result in Redis backend. Yay!
2016-07-08 19:52:55 +01:00
034ebca873
Don't choke on nil replies from Redis.
2016-07-08 19:52:27 +01:00
1aacca9e21
Load save and delete scripts upon connection to Redis.
2016-07-08 16:08:21 +01:00
0e31aa7ea0
Update sample config with dummy Redis settings.
2016-07-08 15:22:31 +01:00
53f9e72172
Nest postgre settings into node "connection" for consistency with redis.
2016-07-08 15:20:49 +01:00
afae0b6d11
Load Lua script search paths into a SearchPaths.
2016-07-08 15:18:26 +01:00
cc943791ef
core should always be a .so
2016-07-08 15:17:13 +01:00
baddd228fa
find_plugin_by_name() now relies on the new SearchPaths class.
2016-07-08 14:50:51 +01:00
5f5b2b5770
New core library.
2016-07-08 14:49:40 +01:00
e728eb2a9e
Various really small changes.
2016-07-08 14:17:51 +01:00
fc4bec4e19
Import ohm-scripts from soveran's repo.
...
They will be used by the redis backend (not the redis wrapper).
2016-07-08 11:45:00 +01:00
0df8c5875c
Buildfix on gcc 5.4
2016-06-30 12:41:01 +01:00
14587f1cb8
Buildfix when not using cryptopp.
2016-06-30 11:40:05 +01:00
53bb4684b4
Allow disabling use of cryptopp from code.
...
Just comment out the definition of MAKE_SHA1_WITH_CRYPTOPP
and the code will fall back to getting the sha1 from Redis.
2016-06-30 11:37:05 +01:00
8d7d4c5555
Implement Script class.
2016-06-30 11:27:15 +01:00
0efd71a2fa
Refactor connection code.
...
Move all redis connection and libev code out from command.
Command just wraps some useful methods in AsyncConnection now.
2016-06-30 09:35:34 +01:00
cf9ac6b296
Add locking so async communication works correctly.
...
helgrind says it works. I think.
2016-06-29 22:51:45 +01:00
7f25fdb37c
Add support for 'status string' replies from Redis.
2016-06-29 22:49:38 +01:00
2e68e639bf
Support conversion to lower case hex.
2016-06-29 22:48:50 +01:00
40e189cf4d
Add on_connect/on_disconnect hiredis callbacks.
2016-06-21 17:52:13 +01:00