1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-26 13:23:55 +00:00
Commit graph

106 commits

Author SHA1 Message Date
King_DuckZ
2e68e639bf Support conversion to lower case hex. 2016-06-29 22:48:50 +01:00
King_DuckZ
7957a94980 Move cmake_on_off.h to helpers dir. 2016-06-20 19:04:24 +01:00
King_DuckZ
53a42fa7c0 Add bin tag to lexical_cast.
This also fixes a subtle bug: the size passed to MaxSizedArray in
int_to_string() was calculated on the max value of type F, but when
F was a signed type the max would only be for example 31 bits.
Conversion of negative numbers would then fail with an assertion.
2016-06-15 23:04:46 +01:00
King_DuckZ
f9387114bf Implement handling of signed types and fix some build errors. 2016-06-15 20:48:05 +01:00
King_DuckZ
2c5030f929 Add dedicated tests for lexical_cast and fix failures I found. 2016-06-15 17:27:32 +01:00
King_DuckZ
7ae8b95599 Rename casts.hpp to lexical_cast.hpp 2016-06-15 15:05:25 +01:00
King_DuckZ
4b30fabbe4 New string_to_tiger function.
Comes with unit test that indirectly also tests the
previously added lexical_cast.
2016-06-15 14:57:52 +01:00
King_DuckZ
7db82f83d9 Add custom lexical_cast function that can handle hex values and string_ref.
Negative values are not supported.
2016-06-15 14:54:24 +01:00
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
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
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
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
61b0b586cf Clean up code to handle failed attempts at loading backend plugins. 2016-06-02 21:16:19 +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
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
King_DuckZ
3608d7b76c Re-enable scan in the postgre plugin.
This also adds a public dependency to machinery in the header-only
backend project. This is because the backend does need functionality
from machinery, such as FileRecordData and TigerHash.
2016-05-31 20:03:31 +02:00
King_DuckZ
8f51f82abc Re-enable delete subcommand 2016-05-31 10:30:16 +02:00
King_DuckZ
df2e04a029 Fix tagging.
Tag functions are now fully available through the new plugin.
2016-05-27 21:51:15 +02:00
King_DuckZ
3927f945ca Move postgresql header files to the src directory
They are private, and anyways no client needs to include anything at all
from the various backends.
2016-05-27 21:49:50 +02:00
King_DuckZ
20b2a8695e Load postgresql plugin and use that in tag.
Only partially implemented.
2016-05-27 20:31:07 +02:00
King_DuckZ
064fc0cf1a Create intermediate backend lib to help loading backend plugins. 2016-05-27 20:28:26 +02:00
King_DuckZ
1fd51f75ba Rename namespace dinbpostgres to dindb.
It's so much better!
2016-05-24 09:57:04 +02:00
King_DuckZ
8f98495049 Make dindexer-common depend on postgre backend and fix build 2016-05-24 09:57:03 +02:00
King_DuckZ
fb722719b2 Move postgresql backend's include files to a new db subdir.
Fix build and remove unneeded include in tag.cpp
2016-05-24 09:57:03 +02:00
King_DuckZ
70caa9e26c Move db dbsource files to the postgresql backend lib and rename namespace. 2016-05-24 09:57:02 +02:00
King_DuckZ
baa67138eb Move MaxSizedArray to helpers include dir. 2016-05-24 09:57:02 +02:00
King_DuckZ
b6d45eee3c Move db scan functions to the postgresql backend lib. 2016-05-22 03:17:26 +01:00
King_DuckZ
641261306f Move db locate functions to the postgresql backend lib. 2016-05-22 03:05:58 +01:00
King_DuckZ
45ecdb9a2b Move db delete to the postgresql backend lib. 2016-05-22 03:02:39 +01:00
King_DuckZ
5203fbece2 Move db tagging functions to a new postgresql backend lib. 2016-05-22 02:54:49 +01:00
King_DuckZ
42acc42d8f Fix wrong assertions. 2016-05-18 22:25:41 +02:00
King_DuckZ
6b5fe85571 Make mime_type and mime_charset on the fly
For the same motivation explained in the parent commit, make string_refs
on the fly instead of storing them.
2016-05-17 21:12:44 +02:00
King_DuckZ
8c03ba15bc Crash fix - make path on the fly
Newer versions of gcc have a small string optimizations that makes
moving FileRecordData objects behave incorrectly. When a small string is
moved, string_refs into it become invalid. Making a path on the fly
using the path() method also has the side effect of making
FileRecordData smaller in size.
2016-05-17 20:21:44 +02:00
King_DuckZ
5832ca3374 Move split_tags to common lib. 2016-05-16 09:59:10 +02:00
King_DuckZ
537023dbfa Fix build error when passing a vector<string_ref> to query() 2016-05-13 20:46:13 +02:00
King_DuckZ
b71a94ef70 Implement basic tab completion in navigate.
It doesn't work super well and it's missing set number
completion, but it's a step forward.
2016-04-28 00:05:22 +02:00
King_DuckZ
1ef879e9c1 Define all case combinations of cmake_on/off.
This saves having to remember to do STRING(TOUPPER) in every cmake file.
At times that's really not convenient if possible at all.
For example when a top-level project is guessing what option some
subproject is going to use and tries to use it for the builtin options
view. The acutal OPTION statement is not there, and it's not nice to put
a string(toupper) on a variable that seems to come from nowhere (and in
fact it might not be there at all).
2016-04-27 01:29:40 +02:00
King_DuckZ
72ce72273d Put definitions for CMAKE_[ON/OFF] in a common header. 2016-04-27 01:18:38 +02:00
King_DuckZ
a625f69afd Import better-enums project from github and put it to use :)
Fix build and somewhat improve the dindexer-scan --help message.
2016-04-26 20:47:29 +02:00
King_DuckZ
3a2db550d2 Warning fix on clang 2016-03-18 22:28:58 +01:00
King_DuckZ
34ead94c8d Restore DB writing functionality.
This ends the scantask refactoring. It is now possible to scan
directories using the new system. Progress feedback is made
available again, although it could use some improvements.
2016-03-10 18:37:42 +01:00
King_DuckZ
43c8024b0c Re-add some progress feedback.
It's not multithreaded this time o.O
2016-03-10 09:51:27 +01:00
King_DuckZ
c28398a1b3 Assert if get_or_create() causes other calls to itself.
This is to try and prevent infinite recursions.
2016-03-09 21:35:22 +01:00
King_DuckZ
fe7e9c4af9 Turn around Set's tasks so that they provide a SetRecordDataFull. 2016-03-09 21:26:43 +01:00
King_DuckZ
85cbc76de4 Add GeneralFiller helper task to group tasks together. 2016-03-09 09:25:52 +01:00
King_DuckZ
5798e0d315 New Mime task. 2016-03-09 09:02:17 +01:00
King_DuckZ
c068f93bac New ContentType task.
Fix the problems I encountered while trying to use the new task.
2016-03-08 19:54:04 +01:00