King_DuckZ
9491f2eb47
Move sequence_bt and string_bt into helpers.
...
They are useful in the Redis backend and in helpers itself.
People wanting to use pq alone from this project will have to cope and
search for all the needed files.
2016-06-15 14:53:07 +01:00
King_DuckZ
874783e8da
Add support for the MATCH and COUNT options for the SCAN commands.
2016-06-14 19:11:13 +01:00
King_DuckZ
423effa6cb
Set client name in Redis to dindexer_v0.1.5
2016-06-14 19:10:10 +01:00
King_DuckZ
fc5e25e3de
Forgot to remove the [TOC] entry :<
2016-06-14 14:07:03 +01:00
King_DuckZ
c61dc4fd9c
Trim down lengthy stuff from the readme.
...
Make it more clear, more up-to-date and less verbose. Hopefully.
2016-06-14 14:06:04 +01:00
King_DuckZ
6a03afb938
Remove compiler check as it's breaking the build even on gcc.
2016-06-14 11:46:44 +01:00
King_DuckZ
53835d54b2
Also return content_type.
2016-06-14 11:07:59 +01:00
King_DuckZ
2a696aa62a
Allow users to selectively build backends.
...
Pass -DDINDEXER_ENABLED_BACKENDS="list,of,backends" to cmake to tell
which backends you want to be built. Currently available backends are
postgresql and redis. Default is postgresql.
Allowed strings in the comma separated list above are the names of the
directories in src/backends.
2016-06-14 11:03:31 +01:00
King_DuckZ
a5d5ee5af5
Also return content_type.
2016-06-14 10:41:38 +01:00
King_DuckZ
549ab7b16a
Write implementation for search_file_by_hash().
...
Note that the postgresql backend does something like
"select blah... where hash=$1 limit 1", so it only returns one match.
The SRANDMEMBER used in this implementation also returns one match,
but it's not deterministic I suppose.
2016-06-14 10:39:42 +01:00
King_DuckZ
9ef9b05014
Move variant types enum out of implem namespace.
...
Also assert that you can get the type you are trying to get before
actually trying.
2016-06-14 09:37:57 +01:00
King_DuckZ
ab43215f49
Use the right syntax for Redis command.
...
With this commit, scan subcommand can save all it needs into Redis.
2016-06-14 09:12:32 +01:00
King_DuckZ
ba8e8b9f7b
Add support for char[N] to the run() method.
2016-06-14 09:11:07 +01:00
King_DuckZ
efd7118189
Add support for single chars to the run() method.
2016-06-14 09:10:45 +01:00
King_DuckZ
9a69b8de10
Throw if Redis reply contains any error messages.
2016-06-13 17:33:25 +01:00
King_DuckZ
93e328d77f
Remove unnecessary usage of recursive_wrapper.
2016-06-13 17:27:52 +01:00
King_DuckZ
316f8f585b
Rename RedisReplyType to just Reply.
2016-06-13 17:00:12 +01:00
King_DuckZ
533b571771
Implement ZSCAN Redis command.
2016-06-13 16:20:54 +01:00
King_DuckZ
78eee0e16f
Make the scan command in ScanPairs a template parameter.
2016-06-13 16:20:31 +01:00
King_DuckZ
9949c273a1
Implement SSCAN Redis command.
2016-06-13 15:38:18 +01:00
King_DuckZ
731582d8fe
Move V into ValueFetch.
...
No need to explicitly specify the dereferenced type directly to
the scan iterator anymore.
2016-06-13 15:24:26 +01:00
King_DuckZ
c7eeddabf1
Implement HSCAN Redis command.
2016-06-13 15:14:10 +01:00
King_DuckZ
e0a82cce2d
Fix SCAN iteration.
2016-06-13 10:57:42 +01:00
King_DuckZ
c1e79c435b
New ScanIterator class.
...
Not yet tested and only supporting the SCAN command for now, more to
come.
Also includes some refactoring that was needed to make everything work.
2016-06-10 20:33:11 +02:00
King_DuckZ
04b667485e
Add optional database selection parameter in yml file.
2016-06-10 09:55:37 +02:00
King_DuckZ
8bdb1f237f
Replace spaces with tabs
2016-06-09 22:55:38 +02:00
King_DuckZ
49a8e81fed
Restore adding sets into Redis using the new run() method.
...
Partial implementation - not for use in real world cases.
2016-06-09 22:20:22 +02:00
King_DuckZ
f7a7015c65
Start putting Redis stuff in a wrapper class.
...
Nonworking, but the project builds.
2016-06-09 19:24:08 +02:00
King_DuckZ
db23dcea3f
Add missing implementation and fix crashes in redis backend.
...
With this you can insert a new set (set only, no files) with dindexer-scan.
2016-06-07 23:13:24 +01:00
King_DuckZ
2d2c7d0b9e
Merge remote-tracking branch 'origin/dev' into dev
2016-06-07 22:46:09 +01:00
King_DuckZ
0ab66fa1f1
Stub implementation of a Redis backend.
2016-06-07 22:45:30 +01:00
King_DuckZ
3fe962a8e5
Make symlink to postgresql backend
...
This is helpful so when running dindexer in a dev environment you don't
need to list all the possible paths to every backend. Symlinks to all
backends will all be in the same place.
2016-06-06 20:24:05 +02:00
King_DuckZ
624bba121f
Remove hardcoded path to postgresql backend and make the search dynamic
2016-06-06 19:54:20 +02:00
King_DuckZ
a1490c3096
Make split_tags a bit more generic so I can reuse it
...
I need it in an upcoming commit where I want to split on ':'
2016-06-06 19:52:42 +02:00
King_DuckZ
d5cf8e21b2
Add cleaning of the new uuid and label properties
2016-06-04 01:13:47 +02:00
King_DuckZ
2057c797cb
SetRecordData is not really needed anymore so get rid of it
...
Always use SetRecordDataFull now.
2016-06-04 01:13:26 +02:00
King_DuckZ
7117ff7be2
Save and read label and uuid to the database
2016-06-04 01:03:20 +02:00
King_DuckZ
55a61526dc
Fix DiscInfo and make it find label and uuid correctly.
...
It's not the mountpoint's inode that I needed, but that of the dev!
2016-06-04 01:02:37 +02:00
King_DuckZ
f0e67f1c97
Fix wrong block of code
...
Backend plugin was not being initialized due to some copy paste error.
2016-06-03 21:50:45 +02:00
King_DuckZ
5e1dfe3749
Warning fix in clang.
2016-06-03 20:27:07 +02:00
King_DuckZ
742d024bfb
Implement label and uuid retrieval for the disk being scanned.
2016-06-03 20:26:54 +02:00
King_DuckZ
29c98c0154
Add module to find Redis C library
2016-06-02 22:49:49 +01:00
King_DuckZ
61b0b586cf
Clean up code to handle failed attempts at loading backend plugins.
2016-06-02 21:16:19 +02:00
King_DuckZ
7de71943ad
Name backend settings section in yml using the backend name itself.
2016-06-02 18:38:40 +02:00
King_DuckZ
4aceccbf4d
New Diaspora post
2016-06-02 18:29:37 +02:00
King_DuckZ
e2275ce5db
Add a backend interface version number for eventual future changes.
...
Note that the interface is still a work in progress and might change
while still keeping the same interface version. This is going to be true
until the first stable release of this project (non beta).
2016-06-02 10:01:19 +02:00
King_DuckZ
0cb91fb9ca
Put LIMIT number into a common header.
2016-06-02 09:42:32 +02:00
King_DuckZ
dfe3655296
Re-enable navigate in the postgre plugin.
2016-06-02 09:35:33 +02:00
King_DuckZ
780cd9b0ca
Re-enable locate in the postgre plugin.
2016-06-01 10:29:23 +02:00
King_DuckZ
470738fc1b
Fix typo - correct type is 16 bit int, not 64
2016-06-01 10:08:56 +02:00