Code

sysdb.git
10 years agoplugin: Removed obsolete TODO note.
Sebastian Harl [Mon, 7 Apr 2014 07:05:30 +0000 (09:05 +0200)]
plugin: Removed obsolete TODO note.

10 years agofrontend: Actually implement support for the NOT operator.
Sebastian Harl [Sun, 6 Apr 2014 17:57:07 +0000 (19:57 +0200)]
frontend: Actually implement support for the NOT operator.

10 years agocore, frontend: Added !=, !~, and NOT operators.
Sebastian Harl [Sun, 6 Apr 2014 17:42:43 +0000 (19:42 +0200)]
core, frontend: Added !=, !~, and NOT operators.

10 years agostore_lookup: Added sdb_store_inv_matcher().
Sebastian Harl [Sun, 6 Apr 2014 17:17:51 +0000 (19:17 +0200)]
store_lookup: Added sdb_store_inv_matcher().

This creates a matcher objects which matches the inverse (logical NOT) of the
specified matcher.

10 years agofrontend: Let the parser support brackets in matcher expressions.
Sebastian Harl [Sun, 6 Apr 2014 12:17:55 +0000 (14:17 +0200)]
frontend: Let the parser support brackets in matcher expressions.

10 years agofrontend: Fixed memory holes in the parser.
Sebastian Harl [Sun, 6 Apr 2014 12:04:48 +0000 (14:04 +0200)]
frontend: Fixed memory holes in the parser.

10 years agostore: Don't change the interval if the new interval is zero.
Sebastian Harl [Sun, 6 Apr 2014 11:46:37 +0000 (13:46 +0200)]
store: Don't change the interval if the new interval is zero.

If the interval is zero, multiple updates happened at the same time. This does
not affect the interval at which the object is updated in the backend, though.

10 years agoparser_test: Check operator precedence.
Sebastian Harl [Sun, 6 Apr 2014 11:38:27 +0000 (13:38 +0200)]
parser_test: Check operator precedence.

10 years agoparser_test: Check matcher type returned by sdb_fe_parse_matcher().
Sebastian Harl [Sun, 6 Apr 2014 11:35:32 +0000 (13:35 +0200)]
parser_test: Check matcher type returned by sdb_fe_parse_matcher().

10 years agofrontend parser: Added support for AND and OR matchers.
Sebastian Harl [Sun, 6 Apr 2014 11:28:21 +0000 (13:28 +0200)]
frontend parser: Added support for AND and OR matchers.

10 years agofrontend: Updated unit-tests for expression related parsing.
Sebastian Harl [Sat, 5 Apr 2014 18:20:13 +0000 (20:20 +0200)]
frontend: Updated unit-tests for expression related parsing.

10 years agofrontend: Accept compare matchers as expressions.
Sebastian Harl [Sat, 5 Apr 2014 18:06:28 +0000 (20:06 +0200)]
frontend: Accept compare matchers as expressions.

… replacing the current placeholder.

For now, this is specific to '=' (equal) and '=~' (regex) comparison.

10 years agofrontend: Don't ignore single characters in the scanner.
Sebastian Harl [Sat, 5 Apr 2014 17:49:47 +0000 (19:49 +0200)]
frontend: Don't ignore single characters in the scanner.

This would lead to those characters be silently ignored at any place in the
input stream.

10 years agostore: Added sdb_store_matcher_parse_cmp().
Sebastian Harl [Sat, 5 Apr 2014 16:42:06 +0000 (18:42 +0200)]
store: Added sdb_store_matcher_parse_cmp().

This function parses simple matcher compare expressions (<obj_type>.<attr>
<op> <value>).

10 years agostore: Moved matcher types to store-private.h.
Sebastian Harl [Sat, 5 Apr 2014 16:41:26 +0000 (18:41 +0200)]
store: Moved matcher types to store-private.h.

10 years agocollectd::unixsock backend: Simplified host updates.
Sebastian Harl [Fri, 4 Apr 2014 10:44:13 +0000 (12:44 +0200)]
collectd::unixsock backend: Simplified host updates.

Also, don't do duplicate updates in a single iteration. This caused bad
startup effects for the interval calculation.

Later, we should make the core more robust in that respect, I guess.

10 years agostore_test: Added a test for interval calculation.
Sebastian Harl [Thu, 3 Apr 2014 14:03:59 +0000 (16:03 +0200)]
store_test: Added a test for interval calculation.

10 years agostore: Include update interval in the JSON serialization.
Sebastian Harl [Thu, 3 Apr 2014 13:28:00 +0000 (15:28 +0200)]
store: Include update interval in the JSON serialization.

10 years agocore/time: Added sdb_strfinterval().
Sebastian Harl [Thu, 3 Apr 2014 13:04:30 +0000 (15:04 +0200)]
core/time: Added sdb_strfinterval().

This function formats a time interval using the format 1Y2M3D4h5m6.7s.

10 years agostore: Fixed a conversion warning reported by GCC.
Sebastian Harl [Thu, 3 Apr 2014 08:24:48 +0000 (10:24 +0200)]
store: Fixed a conversion warning reported by GCC.

10 years agostore: Calculate and store each objects update interval.
Sebastian Harl [Wed, 2 Apr 2014 10:37:10 +0000 (12:37 +0200)]
store: Calculate and store each objects update interval.

The interval is calculated as the moving average of the incoming update
intervals. This should also work fine for out-of-order updates or updates from
multiple sources.

10 years agofrontend: Let LIST not include details.
Sebastian Harl [Wed, 2 Apr 2014 10:23:37 +0000 (12:23 +0200)]
frontend: Let LIST not include details.

Now that we have FETCH and LOOKUP, list should only provide basic information
(name and last_update).

10 years agoparser_test: Added simple LOOKUP parser tests.
Sebastian Harl [Tue, 1 Apr 2014 21:03:43 +0000 (23:03 +0200)]
parser_test: Added simple LOOKUP parser tests.

10 years agofrontend: Added LOOKUP support to the connection handler.
Sebastian Harl [Tue, 1 Apr 2014 21:00:44 +0000 (23:00 +0200)]
frontend: Added LOOKUP support to the connection handler.

For now, the wire format is: <CONNECTION_LOOKUP>;<len>;<expression>

10 years agofrontend: Added simple 'LOOKUP <type> WHERE <expression>' query.
Sebastian Harl [Tue, 1 Apr 2014 20:45:19 +0000 (22:45 +0200)]
frontend: Added simple 'LOOKUP <type> WHERE <expression>' query.

This query command may be used to retrieve a list of detailed host information
for each host matching the specified expression. For now, querying hosts is
supported only.

10 years agostore: Let sdb_store_matcher_matches return true if it matches.
Sebastian Harl [Tue, 1 Apr 2014 20:09:26 +0000 (22:09 +0200)]
store: Let sdb_store_matcher_matches return true if it matches.

Rather than using 0 for matches and -1 else.

10 years agostore: Added sdb_store_lookup().
Sebastian Harl [Tue, 1 Apr 2014 19:52:39 +0000 (21:52 +0200)]
store: Added sdb_store_lookup().

This function looks up objects from the store which match a user-specified
matcher. For each such object, a user-specified callback is executed.

10 years agostore: Added sdb_store_iterate().
Sebastian Harl [Tue, 1 Apr 2014 19:34:23 +0000 (21:34 +0200)]
store: Added sdb_store_iterate().

This function iterates over all (host, for now) objects in the store and calls
a user-specified callback for each.

10 years agogrammar.y: Added some (very) short documentation for each statement.
Sebastian Harl [Tue, 1 Apr 2014 05:15:39 +0000 (07:15 +0200)]
grammar.y: Added some (very) short documentation for each statement.

10 years agoparser_test: Fixed a sign-compare warning/error on GCC.
Sebastian Harl [Mon, 31 Mar 2014 21:54:53 +0000 (23:54 +0200)]
parser_test: Fixed a sign-compare warning/error on GCC.

10 years agofrontend: Require strings instead of identifiers.
Sebastian Harl [Mon, 31 Mar 2014 21:39:38 +0000 (23:39 +0200)]
frontend: Require strings instead of identifiers.

… for host names and name matchers. Identifiers were used as an early
work-around but they are not valid in those places.

10 years agofrontend: Added very simple single-quoted string support.
Sebastian Harl [Mon, 31 Mar 2014 21:35:23 +0000 (23:35 +0200)]
frontend: Added very simple single-quoted string support.

No escape sequences whatsoever are supported so far but except for that any
single-quoted strings which do not contain single quotes, can be used.

FETCH now supports host names specified as strings as well.

10 years agofrontend: Free dynamically allocated memory in the parser.
Sebastian Harl [Mon, 31 Mar 2014 21:34:58 +0000 (23:34 +0200)]
frontend: Free dynamically allocated memory in the parser.

10 years agofrontend: Added FETCH support to the connection handler.
Sebastian Harl [Mon, 31 Mar 2014 21:21:54 +0000 (23:21 +0200)]
frontend: Added FETCH support to the connection handler.

The wire format is: <CONNECTION_FETCH>;<len>;<host>

10 years agoparser_test: Check the node's command type.
Sebastian Harl [Mon, 31 Mar 2014 21:18:37 +0000 (23:18 +0200)]
parser_test: Check the node's command type.

10 years agofrontend: Added 'FETCH <name>' query command.
Sebastian Harl [Mon, 31 Mar 2014 21:17:34 +0000 (23:17 +0200)]
frontend: Added 'FETCH <name>' query command.

For now, <name> may only be a simple identifier.

10 years agoobject: Added sdb_object_create_dT() macro.
Sebastian Harl [Mon, 31 Mar 2014 20:47:46 +0000 (22:47 +0200)]
object: Added sdb_object_create_dT() macro.

This may be used to create a simple dynamic object of a specified type.
Dynamic type means that it uses a destructor.

10 years agoobject: Let create_simple() accept an optional destructor.
Sebastian Harl [Mon, 31 Mar 2014 20:41:37 +0000 (22:41 +0200)]
object: Let create_simple() accept an optional destructor.

This is still simple but it allows for some more dynamic.

10 years agofrontend: Let the parser not accept other grammars in default mode.
Sebastian Harl [Thu, 20 Mar 2014 07:36:54 +0000 (08:36 +0100)]
frontend: Let the parser not accept other grammars in default mode.

10 years agoutils llist: Let llist_get() increment the reference count.
Sebastian Harl [Fri, 7 Mar 2014 13:52:59 +0000 (14:52 +0100)]
utils llist: Let llist_get() increment the reference count.

This feels more consistent.

10 years agofrontend parser: Added support for parsing single expressions.
Sebastian Harl [Fri, 7 Mar 2014 11:47:06 +0000 (12:47 +0100)]
frontend parser: Added support for parsing single expressions.

The parser has been extended to support different modes. In SDB_PARSE_EXPR
mode, a single expression will be accepted as a start condition. The new
function sdb_fe_parse_matcher() uses this to parse expressions.

For now, this implements only the basic framework. Any identifier will be
parsed as a simple name matcher expression.

10 years agot/cibuild.sh: Use ./configure --enable-standards.
Sebastian Harl [Mon, 24 Feb 2014 02:43:49 +0000 (18:43 -0800)]
t/cibuild.sh: Use ./configure --enable-standards.

10 years agoconfigure: Don't use -pedantic.
Sebastian Harl [Mon, 24 Feb 2014 01:48:25 +0000 (17:48 -0800)]
configure: Don't use -pedantic.

Else, GCC will complain about "ISO C forbids conversion of object pointer to
function pointer type", even for casting function points to or from void
pointers. This is allowed by POSIX, though, and required, for example, for
dlsym() to work.

10 years agoconfigure: Make "standards" and "hardening" flags part of STRICT_CFLAGS.
Sebastian Harl [Mon, 24 Feb 2014 01:43:58 +0000 (17:43 -0800)]
configure: Make "standards" and "hardening" flags part of STRICT_CFLAGS.

Most importantly, don't assign them to CFLAGS which might be overwritten when
running make, thus leaving out the flags which were originally requested to be
used.

10 years agoconfigure: Disable -Wsign-conversion.
Sebastian Harl [Mon, 24 Feb 2014 01:21:51 +0000 (17:21 -0800)]
configure: Disable -Wsign-conversion.

It may cause problems in expanded macros from libc.

10 years agoconfigure: Request X/Open 7 (XSI) compliance.
Sebastian Harl [Sun, 23 Feb 2014 20:39:45 +0000 (12:39 -0800)]
configure: Request X/Open 7 (XSI) compliance.

This is required for strndup().

10 years agoconfigure: Include _BSD_SOURCE in standards related defines.
Sebastian Harl [Sun, 23 Feb 2014 20:38:36 +0000 (12:38 -0800)]
configure: Include _BSD_SOURCE in standards related defines.

Else, GNU libc does not define strcasecmp() even though it conforms to
POSIX.1-2001.

10 years agoRemoved semicolon from SDB_PLUGIN_MAGIC definition.
Sebastian Harl [Sun, 23 Feb 2014 20:37:48 +0000 (12:37 -0800)]
Removed semicolon from SDB_PLUGIN_MAGIC definition.

Rather, the semicolon is added when using the define.

10 years agoFixed (pedantic) void-pointer to function-pointer cast warnings.
Sebastian Harl [Sun, 23 Feb 2014 20:37:07 +0000 (12:37 -0800)]
Fixed (pedantic) void-pointer to function-pointer cast warnings.

10 years agoInclude config.h in source files.
Sebastian Harl [Sun, 23 Feb 2014 20:35:33 +0000 (12:35 -0800)]
Include config.h in source files.

Else, we don't get any definitions required for enforcing standard compliance.

10 years agofrontend: Fixed two typing issues.
Sebastian Harl [Sun, 23 Feb 2014 04:48:03 +0000 (20:48 -0800)]
frontend: Fixed two typing issues.

10 years agofrontend, liboconfig: Added missing prototypes for yylex/yyparse.
Sebastian Harl [Sun, 23 Feb 2014 04:41:11 +0000 (20:41 -0800)]
frontend, liboconfig: Added missing prototypes for yylex/yyparse.

10 years agostore_lookup_test: Continue loop after fail().
Sebastian Harl [Sun, 23 Feb 2014 04:25:56 +0000 (20:25 -0800)]
store_lookup_test: Continue loop after fail().

The compiler does not know that fail aborts the test program and clang
(correctly) complains that the variable ('m' in this case) might be used
uninitialized afterwards.

10 years agot/coverage.sh: Fall-back to lcov without --no-external.
Sebastian Harl [Sun, 23 Feb 2014 04:14:26 +0000 (20:14 -0800)]
t/coverage.sh: Fall-back to lcov without --no-external.

Old versions of lcov don't support that flag. Simply try to fall back in case
the first run fails.

10 years agostore_lookup: Made logical operators public.
Sebastian Harl [Sun, 23 Feb 2014 04:12:05 +0000 (20:12 -0800)]
store_lookup: Made logical operators public.

10 years agoAdded tests for store lookup functions.
Sebastian Harl [Sun, 23 Feb 2014 03:22:17 +0000 (19:22 -0800)]
Added tests for store lookup functions.

10 years agostore: Added public functions to create and execute matchers.
Sebastian Harl [Sun, 23 Feb 2014 03:19:24 +0000 (19:19 -0800)]
store: Added public functions to create and execute matchers.

The matcher types are now based on sdb_object_t to ease memory management in
case a matcher is used in multiple places. Constructors for each matcher type
are now available and the top-level matching function has been made public.

10 years agot/coverage.sh: Use version-gen.sh to determine the current version.
Sebastian Harl [Sun, 23 Feb 2014 03:16:16 +0000 (19:16 -0800)]
t/coverage.sh: Use version-gen.sh to determine the current version.

… rather than guessing ;-) D'oh!

10 years agot/coverage.sh: Don't git reset but test the current, possibly dirty, code.
Sebastian Harl [Sun, 23 Feb 2014 03:09:55 +0000 (19:09 -0800)]
t/coverage.sh: Don't git reset but test the current, possibly dirty, code.

Instead, only get back files which are not included in the tarball.

10 years agostore_lookup: Fix matching of services with empty attr matcher.
Sebastian Harl [Fri, 21 Feb 2014 02:16:27 +0000 (03:16 +0100)]
store_lookup: Fix matching of services with empty attr matcher.

10 years agostore: Require name matchers to match string *and* regex if specified.
Sebastian Harl [Fri, 21 Feb 2014 02:07:11 +0000 (03:07 +0100)]
store: Require name matchers to match string *and* regex if specified.

10 years agostore: Fixed data format error detection.
Sebastian Harl [Fri, 21 Feb 2014 01:46:33 +0000 (02:46 +0100)]
store: Fixed data format error detection.

10 years agostore_test: Clear the test after running the test-case.
Sebastian Harl [Fri, 21 Feb 2014 01:00:21 +0000 (02:00 +0100)]
store_test: Clear the test after running the test-case.

This removes any cross-dependencies between multiple checks.

10 years agostore: Added sdb_store_clear().
Sebastian Harl [Fri, 21 Feb 2014 00:52:43 +0000 (01:52 +0100)]
store: Added sdb_store_clear().

This function clears the entire store removing all entries. It's mostly
useful for testing, I suppose.

10 years agostore: Added a frame-work for object lookups.
Sebastian Harl [Thu, 20 Feb 2014 22:16:25 +0000 (23:16 +0100)]
store: Added a frame-work for object lookups.

store_lookup currently provides low-level functionality for matching store
objects based on their various attributes.

10 years agodata: Let sdb_data_format() different quoting styles.
Sebastian Harl [Thu, 20 Feb 2014 22:11:47 +0000 (23:11 +0100)]
data: Let sdb_data_format() different quoting styles.

10 years agodata_test: Compare return values of format() and strlen().
Sebastian Harl [Thu, 20 Feb 2014 21:52:02 +0000 (22:52 +0100)]
data_test: Compare return values of format() and strlen().

This is to check that sdb_data_strlen() reports sane numbers.

10 years agodata: Let sdb_data_format() return the number of bytes written.
Sebastian Harl [Thu, 20 Feb 2014 21:48:43 +0000 (22:48 +0100)]
data: Let sdb_data_format() return the number of bytes written.

10 years agodate_test: Added some simple overflow tests.
Sebastian Harl [Thu, 20 Feb 2014 21:41:26 +0000 (22:41 +0100)]
date_test: Added some simple overflow tests.

10 years agodata: Let sdb_data_format output to a character array.
Sebastian Harl [Thu, 20 Feb 2014 21:37:01 +0000 (22:37 +0100)]
data: Let sdb_data_format output to a character array.

This is more universally usable.

10 years agodata: Added sdb_data_strlen.
Sebastian Harl [Thu, 20 Feb 2014 21:24:48 +0000 (22:24 +0100)]
data: Added sdb_data_strlen.

This function provides a worst-case estimate of the number of bytes required
to format a datum as a string.

10 years agodata_test: Print type of datum in case of a test failure.
Sebastian Harl [Thu, 20 Feb 2014 20:57:04 +0000 (21:57 +0100)]
data_test: Print type of datum in case of a test failure.

10 years agodata_test: Use a table-driven test.
Sebastian Harl [Thu, 20 Feb 2014 20:51:27 +0000 (21:51 +0100)]
data_test: Use a table-driven test.

10 years agodata: Escape \ and " in strings when formatting them.
Sebastian Harl [Thu, 20 Feb 2014 20:36:46 +0000 (21:36 +0100)]
data: Escape \ and " in strings when formatting them.

10 years agodata: Correctly format NULL values.
Sebastian Harl [Thu, 20 Feb 2014 20:27:38 +0000 (21:27 +0100)]
data: Correctly format NULL values.

10 years agostore: Split private type definitions into a new header store-private.h.
Sebastian Harl [Wed, 19 Feb 2014 22:12:24 +0000 (23:12 +0100)]
store: Split private type definitions into a new header store-private.h.

10 years agostore: Serialize attribute values using sdb_data_format().
Sebastian Harl [Tue, 11 Feb 2014 08:25:52 +0000 (09:25 +0100)]
store: Serialize attribute values using sdb_data_format().

10 years agostore: Removed sdb_ prefix from private lookup function.
Sebastian Harl [Mon, 10 Feb 2014 18:15:40 +0000 (19:15 +0100)]
store: Removed sdb_ prefix from private lookup function.

10 years agodata: Double quote formatted date-times.
Sebastian Harl [Mon, 10 Feb 2014 18:12:49 +0000 (19:12 +0100)]
data: Double quote formatted date-times.

JSON does not support time values, thus, we need to treat this is a string.

10 years agodata: Format binary bytes as \xXX rather than \XX.
Sebastian Harl [Mon, 10 Feb 2014 18:10:52 +0000 (19:10 +0100)]
data: Format binary bytes as \xXX rather than \XX.

10 years agodata: Improve serialization of binary data.
Sebastian Harl [Mon, 10 Feb 2014 18:07:49 +0000 (19:07 +0100)]
data: Improve serialization of binary data.

Instead of calling strbuf_append() for each byte, precompute the string in a
simple for-loop and then append the result to the buffer. This basically
inlines a formatter specific to this use-case and, thus, should be must
faster.

10 years agofrontend: Don't send debug logs to the client (for now).
Sebastian Harl [Thu, 6 Feb 2014 19:17:09 +0000 (20:17 +0100)]
frontend: Don't send debug logs to the client (for now).

Later, this should be configurable by the client at runtime.

10 years agofrontend: Send connection-related log messages to the client.
Sebastian Harl [Thu, 6 Feb 2014 19:12:38 +0000 (20:12 +0100)]
frontend: Send connection-related log messages to the client.

This is done by registering a logging callback which will send all messages
originating from a thread currently handling a connection to the respective
client. For this, the connection object is stored in a thread-specific data
segment.

10 years agosysdb: Handle EOF from the server.
Sebastian Harl [Thu, 6 Feb 2014 19:11:45 +0000 (20:11 +0100)]
sysdb: Handle EOF from the server.

10 years agoclient: Correctly handle EOF in sdb_client_connect().
Sebastian Harl [Thu, 6 Feb 2014 08:23:52 +0000 (09:23 +0100)]
client: Correctly handle EOF in sdb_client_connect().

10 years agoclient: Added an EOF flag to the client object.
Sebastian Harl [Thu, 6 Feb 2014 08:19:31 +0000 (09:19 +0100)]
client: Added an EOF flag to the client object.

In a lot of cases, a client is passed through a couple of functions in order
to handle I/O. Adding the flag will make it easier to access the information
in the right location without having to worry about 0 return codes (which mean
different things in some cases anyway, e.g. in sdb_client_recv() which returns
zero if an empty message (header only) has been received).

10 years agofrontend/connection: Require authentication before allowing any commands.
Sebastian Harl [Wed, 5 Feb 2014 21:08:54 +0000 (22:08 +0100)]
frontend/connection: Require authentication before allowing any commands.

10 years agofrontend/session: Store authenticated user information.
Sebastian Harl [Wed, 5 Feb 2014 21:07:46 +0000 (22:07 +0100)]
frontend/session: Store authenticated user information.

Also, for now, reject access in case no username is provided.

10 years agollist_test: Added simple tests for _search() and _remove().
Sebastian Harl [Tue, 4 Feb 2014 22:57:27 +0000 (23:57 +0100)]
llist_test: Added simple tests for _search() and _remove().

10 years agoUpdated copyright information.
Sebastian Harl [Tue, 4 Feb 2014 22:35:46 +0000 (23:35 +0100)]
Updated copyright information.

10 years agosysdb: Hide implementation details in the "input" module.
Sebastian Harl [Tue, 4 Feb 2014 22:31:36 +0000 (23:31 +0100)]
sysdb: Hide implementation details in the "input" module.

… and added some overview documentation about how the "input" module works and
interacts with the other subsystems.

10 years agosysdb: Use the asynchronous readline interface; handle asynch server replies.
Sebastian Harl [Tue, 4 Feb 2014 21:57:46 +0000 (22:57 +0100)]
sysdb: Use the asynchronous readline interface; handle asynch server replies.

For this, setup the terminal in non-canonical, raw mode in order to be able to
handle each single character input. This allows to handle user input and
asynchronous server replies at the same time but without the need to give up
sequential operation (no threads are required for the asynchronous operation).
Instead, select() is used to do the input multiplexing allowing to easily
handle different output.

10 years agosysdb: Split sdb_command_exec() into two functions.
Sebastian Harl [Tue, 4 Feb 2014 21:56:23 +0000 (22:56 +0100)]
sysdb: Split sdb_command_exec() into two functions.

Separate the handling of the server's reply to make it reusable by other parts
of the code.

10 years agoMerged branch 'master' of git://git.tokkee.org/sysdb.
Sebastian Harl [Fri, 31 Jan 2014 06:27:24 +0000 (07:27 +0100)]
Merged branch 'master' of git://git.tokkee.org/sysdb.

10 years agocore/data: Added sdb_data_format() function.
Sebastian Harl [Thu, 30 Jan 2014 17:53:29 +0000 (18:53 +0100)]
core/data: Added sdb_data_format() function.

This function creates a string representation of a datum using a default
format.

10 years agocore/data.h: Removed obsolete comment.
Sebastian Harl [Thu, 30 Jan 2014 08:12:57 +0000 (09:12 +0100)]
core/data.h: Removed obsolete comment.

10 years agostore: Added support for different data-types for attributes.
Sebastian Harl [Wed, 29 Jan 2014 20:55:58 +0000 (21:55 +0100)]
store: Added support for different data-types for attributes.

An attribute value is now stored as sdb_data_t, supporting all data-types
which are supported by that type.

JSON-serialization does not fully support that yet, though.

10 years agoutils dbi: Use sdb_data_free_datum().
Sebastian Harl [Wed, 29 Jan 2014 20:42:09 +0000 (21:42 +0100)]
utils dbi: Use sdb_data_free_datum().

10 years agodata: Added helper functions to copy and free data.
Sebastian Harl [Wed, 29 Jan 2014 20:41:18 +0000 (21:41 +0100)]
data: Added helper functions to copy and free data.

10 years agodbi_test: Mocked required dbi*_copy_idx() functions.
Sebastian Harl [Wed, 29 Jan 2014 09:33:44 +0000 (10:33 +0100)]
dbi_test: Mocked required dbi*_copy_idx() functions.