6 years agostore_json: Fix parent/child detection.
Sebastian Harl [Mon, 28 Sep 2015 20:07:08 +0000 (22:07 +0200)]
store_json: Fix parent/child detection.

Rewinding the formatter state has to happen any time we see a parent object of
the current object. This happens every time the current context isn't HOST
(hosts don't have any parents) or the new object is an ATTRIBUTE (which are
always children of whatever other object type).

This broke in 3603db13105aefac4d6ceb356bcfd118a92fa654.

6 years agostore_json: Split sdb_store_json_emit into private functions.
Sebastian Harl [Mon, 28 Sep 2015 08:06:33 +0000 (10:06 +0200)]
store_json: Split sdb_store_json_emit into private functions.

The public function will only handle memstore specific logic.

6 years agostore_json: Moved special casing of parent objects into the caller.
Sebastian Harl [Mon, 28 Sep 2015 07:54:15 +0000 (09:54 +0200)]
store_json: Moved special casing of parent objects into the caller.

This makes the JSON module more generic by removing a special case of the
memory store. The caller may now emit arbitrary objects and the formatter will
do the right thing as long as parent-child relationships are right.

6 years agostore, plugin: Let the plugin module determine an objects backends.
Sebastian Harl [Thu, 24 Sep 2015 18:49:55 +0000 (20:49 +0200)]
store, plugin: Let the plugin module determine an objects backends.

The store writer plugins are only expected to record the provided backend
(after merging it with existing entries).

6 years agostore: Further abstract internal handling of new objects.
Sebastian Harl [Thu, 24 Sep 2015 07:38:26 +0000 (09:38 +0200)]
store: Further abstract internal handling of new objects.

Add a new type representing a to-be-stored object to simplify storing new

6 years agostore: Simplified store-attribute callback.
Sebastian Harl [Wed, 23 Sep 2015 19:49:38 +0000 (21:49 +0200)]
store: Simplified store-attribute callback.

There's no need anymore to split this across multiple functions. It's easier
to follow if the code is in one place.

6 years agostore: Add separate store-object types for the store writer API.
Sebastian Harl [Tue, 22 Sep 2015 08:09:24 +0000 (10:09 +0200)]
store: Add separate store-object types for the store writer API.

The argument list of some of the callbacks has already gotten kinda long and
we'll want to add more (backends, etc.). Introduce new types which provide all
meta-data of the respective store types.

Also, only use a single callback to store all kinds of attributes, similar to
how it was already done in the "proto" module.

6 years agostore: Dropped sdb_ prefix from private store types.
Sebastian Harl [Thu, 17 Sep 2015 07:20:15 +0000 (09:20 +0200)]
store: Dropped sdb_ prefix from private store types.

6 years agostore.h: Updated some documentation comments.
Sebastian Harl [Wed, 16 Sep 2015 19:46:18 +0000 (21:46 +0200)]
store.h: Updated some documentation comments.

A store instance isn't synonym to "the database" anymore.

6 years agoplugin, store: Add service/metric "hostname" attributes centrally.
Sebastian Harl [Wed, 16 Sep 2015 19:33:05 +0000 (21:33 +0200)]
plugin, store: Add service/metric "hostname" attributes centrally.

That is, let the respective sdb_plugin_store* functions do that instead of
requiring each store implementation to do so.

6 years agofrontend/query_test: Test some weird, special cases.
Sebastian Harl [Thu, 3 Sep 2015 08:05:38 +0000 (10:05 +0200)]
frontend/query_test: Test some weird, special cases.

6 years agostore: Fix execution of more complex iterators.
Sebastian Harl [Wed, 2 Sep 2015 22:40:39 +0000 (00:40 +0200)]
store: Fix execution of more complex iterators.

That is, follow "indirections" of typed expressions if the iterator is not on
the top-most level.

6 years agoRemove unused sdb_store_expr_iterable().
Sebastian Harl [Wed, 2 Sep 2015 22:13:25 +0000 (00:13 +0200)]
Remove unused sdb_store_expr_iterable().

6 years agoAllow and implement iterating arbitrary (non-constant) array values.
Sebastian Harl [Wed, 2 Sep 2015 21:49:20 +0000 (23:49 +0200)]
Allow and implement iterating arbitrary (non-constant) array values.

That is, iterators may now work with arithmetic expressions that evaluate to
an array.

6 years agoanalyzer: Support more flexible iterator expressions.
Sebastian Harl [Mon, 31 Aug 2015 20:50:20 +0000 (22:50 +0200)]
analyzer: Support more flexible iterator expressions.

In particular, more complex typed expressions may now include an iterator on a
lower level, like `LOOKUP services MATCHING ANY host.backend =~ 'foo'`. This
is done by adding more information to the analyzer context and pushing it down
to child nodes in the AST if necessary.

As a nice side-effect, the iterator analyzer does not longer have to know
about the specific type of its child node.

6 years agoanalyzer: Fixed some error messages.
Sebastian Harl [Mon, 31 Aug 2015 20:28:28 +0000 (22:28 +0200)]
analyzer: Fixed some error messages.

6 years agoparser: Require a context for each parser operation.
Sebastian Harl [Mon, 31 Aug 2015 20:08:45 +0000 (22:08 +0200)]
parser: Require a context for each parser operation.

That is, let the caller provide the execution context (object type) when
parsing incomplete commands (conditionals / arithmetic expressions). This
removes the need to call the analyzer again and avoids some special code in
the analyzer.

6 years agoLet the front-end handle STORE commands.
Sebastian Harl [Mon, 24 Aug 2015 19:16:06 +0000 (21:16 +0200)]
Let the front-end handle STORE commands.

… rather than requiring each reader plugin to do so which doesn't make any
sense at all.

6 years agot/integration/ Add integration tests for the STORE command.
Sebastian Harl [Mon, 24 Aug 2015 19:15:28 +0000 (21:15 +0200)]
t/integration/ Add integration tests for the STORE command.

6 years agostore: Do not canonicalize the hostname when fetching a timeseries.
Sebastian Harl [Thu, 13 Aug 2015 17:02:14 +0000 (19:02 +0200)]
store: Do not canonicalize the hostname when fetching a timeseries.

This decision should be made on a higher level.

6 years agofrontend: Connection-specific functions now use the sdb_conn_ prefix.
Sebastian Harl [Thu, 13 Aug 2015 16:55:34 +0000 (18:55 +0200)]
frontend: Connection-specific functions now use the sdb_conn_ prefix.

… instead of sdb_fe_.

6 years agofrontend/connection.h: Removed sdb_fe_parse, it has been dropped.
Sebastian Harl [Thu, 13 Aug 2015 07:04:51 +0000 (09:04 +0200)]
frontend/connection.h: Removed sdb_fe_parse, it has been dropped.

6 years agostore: Removed obsolete TODO note.
Sebastian Harl [Thu, 13 Aug 2015 06:52:34 +0000 (08:52 +0200)]
store: Removed obsolete TODO note.

6 years agoplugin, store: Handle hostname canonicalization in the plugin module.
Sebastian Harl [Wed, 12 Aug 2015 19:55:41 +0000 (21:55 +0200)]
plugin, store: Handle hostname canonicalization in the plugin module.

This is a high-level functionality. Each store implementation should not have
to worry about it.

6 years agosysdb(7): Briefly mention the object store.
Sebastian Harl [Mon, 10 Aug 2015 07:44:23 +0000 (09:44 +0200)]
sysdb(7): Briefly mention the object store.

6 years agosysdbd-store-memory(5): Added a manpage for store::memory.
Sebastian Harl [Mon, 10 Aug 2015 07:36:50 +0000 (09:36 +0200)]
sysdbd-store-memory(5): Added a manpage for store::memory.

6 years agostore::memory: Add a plugin providing an in-memory store.
Sebastian Harl [Sun, 9 Aug 2015 22:19:28 +0000 (00:19 +0200)]
store::memory: Add a plugin providing an in-memory store.

This plugin replaces the default, built-in store. It is a simple wrapper
around the built-in store implementation and, thus, provides exactly the same
functionality but wrapped into a plugin.

6 years agot/Makefile: Drop unused, old frontend/parser_test.
Sebastian Harl [Sun, 9 Aug 2015 21:55:23 +0000 (23:55 +0200)]
t/Makefile: Drop unused, old frontend/parser_test.

6 years agoplugin: Report an error when writing to the store with no writers.
Sebastian Harl [Sat, 8 Aug 2015 07:57:48 +0000 (09:57 +0200)]
plugin: Report an error when writing to the store with no writers.

6 years agostore: Drop the global (default) store.
Sebastian Harl [Sat, 8 Aug 2015 07:34:56 +0000 (09:34 +0200)]
store: Drop the global (default) store.

Instead, register a store from sysdbd and make sure to re-register it on
reconfigure. Previously, the store plugin would have been dropped in that

6 years agostore: All store functions now accept a store object.
Sebastian Harl [Fri, 7 Aug 2015 16:26:51 +0000 (18:26 +0200)]
store: All store functions now accept a store object.

That is, instead of operating on a global, shared instance.

6 years agostore: Add wrapper functions to store an object in an arbitrary store.
Sebastian Harl [Thu, 6 Aug 2015 15:39:45 +0000 (17:39 +0200)]
store: Add wrapper functions to store an object in an arbitrary store.

6 years agocore: Export the sdb_store, sdb_store_reader, sdb_store_writer types.
Sebastian Harl [Thu, 6 Aug 2015 15:22:31 +0000 (17:22 +0200)]
core: Export the sdb_store, sdb_store_reader, sdb_store_writer types.

This is in preparation to more flexible store handling.

6 years agot/valgrind.suppress: Refine the suppression in the libc exit handler.
Sebastian Harl [Thu, 6 Aug 2015 06:56:24 +0000 (08:56 +0200)]
t/valgrind.suppress: Refine the suppression in the libc exit handler.

6 years agofrontend: Use the plugin query interface instead of direct store access.
Sebastian Harl [Wed, 5 Aug 2015 08:45:11 +0000 (10:45 +0200)]
frontend: Use the plugin query interface instead of direct store access.

The built-in store is registered as a reader automatically at the moment.

6 years agocore: Add support for reader/query plugins.
Sebastian Harl [Wed, 5 Aug 2015 08:38:48 +0000 (10:38 +0200)]
core: Add support for reader/query plugins.

A reader plugin can be used to query a data-store based on a query described
by an AST. The plugin module provides a generic function for this purpose.

At the moment, only a single reader plugin can be used at a time. Supporting
multiple readers requires a good merge strategy. The challenge is to handle
filters and query conditions correctly which may evaluate differently after
two stores have been merged.

6 years agot/valgrind.suppress: Add an invalid free in a libc exit handler.
Sebastian Harl [Tue, 4 Aug 2015 07:13:47 +0000 (09:13 +0200)]
t/valgrind.suppress: Add an invalid free in a libc exit handler.

7 years agoplugin: Drop sdb_plugin prefix from private names.
Sebastian Harl [Thu, 28 May 2015 08:29:21 +0000 (10:29 +0200)]
plugin: Drop sdb_plugin prefix from private names.

7 years agostore_exec: Remove unnecessary casts.
Sebastian Harl [Thu, 28 May 2015 08:08:45 +0000 (10:08 +0200)]
store_exec: Remove unnecessary casts.

7 years agostore: Let sdb_store_json_formatter_t inherit from sdb_object_t.
Sebastian Harl [Wed, 27 May 2015 20:49:20 +0000 (22:49 +0200)]
store: Let sdb_store_json_formatter_t inherit from sdb_object_t.

7 years agoDrop sdb_store_get_host() from tests.
Sebastian Harl [Wed, 27 May 2015 20:48:21 +0000 (22:48 +0200)]
Drop sdb_store_get_host() from tests.

7 years agostore: Drop unused sdb_store_has_host.
Sebastian Harl [Fri, 22 May 2015 07:21:26 +0000 (09:21 +0200)]
store: Drop unused sdb_store_has_host.

7 years agoReplaced sdb_store_<type> with sdb_plugin_store_<type>.
Sebastian Harl [Thu, 21 May 2015 22:47:24 +0000 (00:47 +0200)]
Replaced sdb_store_<type> with sdb_plugin_store_<type>.

That is, all store updates will now directly go through the plugin API and be
distributed to all store-writer plugins from there.

7 years agoMerged branch 'master' of git://
Sebastian Harl [Thu, 21 May 2015 22:46:58 +0000 (00:46 +0200)]
Merged branch 'master' of git://

7 years agostore: Register a store writer and handle all updates through the plugin API.
Sebastian Harl [Thu, 21 May 2015 22:18:25 +0000 (00:18 +0200)]
store: Register a store writer and handle all updates through the plugin API.

We still reference a global store object. This change further encapsulates the

7 years agoplugin: sdb_plugin_store_* now return >0 if the new value was too old.
Sebastian Harl [Thu, 21 May 2015 22:16:04 +0000 (00:16 +0200)]
plugin: sdb_plugin_store_* now return >0 if the new value was too old.

That is, the return values now mean the same as for the sdb_store_* functions.

7 years agostore: Reordered some functions to group by general purpose.
Sebastian Harl [Thu, 21 May 2015 21:42:11 +0000 (23:42 +0200)]
store: Reordered some functions to group by general purpose.

7 years agoFix an uninitialized value warnings caused by clang not knowing about fail().
Sebastian Harl [Thu, 21 May 2015 21:39:22 +0000 (23:39 +0200)]
Fix an uninitialized value warnings caused by clang not knowing about fail().

7 years agostore: Make the actual store a separate object.
Sebastian Harl [Thu, 21 May 2015 21:36:57 +0000 (23:36 +0200)]
store: Make the actual store a separate object.

That'll allow us to use different store objects in multiple places in the

7 years agostore: Drop sdb_ prefix from private symbols.
Sebastian Harl [Thu, 21 May 2015 18:17:42 +0000 (20:17 +0200)]
store: Drop sdb_ prefix from private symbols.

7 years agodata: Use a predefined format for sdb_strftime().
Sebastian Harl [Wed, 20 May 2015 21:53:48 +0000 (23:53 +0200)]
data: Use a predefined format for sdb_strftime().

Also, print the nanosecond fraction of a second.

7 years agot/: Use ck_assert() instead of assert() in all tests.
Sebastian Harl [Wed, 20 May 2015 20:04:54 +0000 (22:04 +0200)]
t/: Use ck_assert() instead of assert() in all tests.

7 years agosysdbql(7): Document 'value' and 'timeseries' fields.
Sebastian Harl [Wed, 20 May 2015 09:36:37 +0000 (11:36 +0200)]
sysdbql(7): Document 'value' and 'timeseries' fields.

7 years agoparser: Add support for metric timeseries fields.
Sebastian Harl [Wed, 20 May 2015 08:35:29 +0000 (10:35 +0200)]
parser: Add support for metric timeseries fields.

7 years agostore: Add the timeseries field to metrics.
Sebastian Harl [Wed, 20 May 2015 08:34:27 +0000 (10:34 +0200)]
store: Add the timeseries field to metrics.

This is a boolean field that specifies whether a timeseries for the metric is
known to SysDB.

7 years agoparser: Skip context-specific checks if the context is unspecified.
Sebastian Harl [Wed, 20 May 2015 08:32:37 +0000 (10:32 +0200)]
parser: Skip context-specific checks if the context is unspecified.

Else, the analyzer may reject valid queries. It's up to the caller to run the
analyzer using the right context once it's known.

7 years agostore: Remove (now unused) sdb_store_parse_*() helpers.
Sebastian Harl [Wed, 20 May 2015 06:49:38 +0000 (08:49 +0200)]
store: Remove (now unused) sdb_store_parse_*() helpers.

7 years agostore: Remove (now unused) sdb_store_nin_matcher().
Sebastian Harl [Wed, 20 May 2015 06:48:42 +0000 (08:48 +0200)]
store: Remove (now unused) sdb_store_nin_matcher().

7 years agosysdbql(7): Document IS [NOT] TRUE / FALSE.
Sebastian Harl [Tue, 19 May 2015 21:17:11 +0000 (23:17 +0200)]
sysdbql(7): Document IS [NOT] TRUE / FALSE.

7 years agoparser: Add support for <expr> IS [NOT] TRUE / FALSE queries.
Sebastian Harl [Tue, 19 May 2015 21:11:35 +0000 (23:11 +0200)]
parser: Add support for <expr> IS [NOT] TRUE / FALSE queries.

7 years agostore: Add support for unary IS TRUE / IS FALSE matchers.
Sebastian Harl [Tue, 19 May 2015 21:08:30 +0000 (23:08 +0200)]
store: Add support for unary IS TRUE / IS FALSE matchers.

7 years agostore: Drop the special IS-NOT-NULL matcher.
Sebastian Harl [Tue, 19 May 2015 20:28:49 +0000 (22:28 +0200)]
store: Drop the special IS-NOT-NULL matcher.

In the AST world, this is NOT(IS-NULL).

7 years agoutils/proto: Support boolean values.
Sebastian Harl [Tue, 19 May 2015 20:11:50 +0000 (22:11 +0200)]
utils/proto: Support boolean values.

They are encoded as a single byte on the wire.

7 years agodata: Add basic support for a boolean type.
Sebastian Harl [Tue, 19 May 2015 19:42:20 +0000 (21:42 +0200)]
data: Add basic support for a boolean type.

This change breaks backward compatibility of the network protocol because it
changes the encoding of a datum. I felt this is still acceptable (given the
current (non-)compatibility promise) and it made the order of types feel more
natural ;-)

7 years agoDrop the old frontend parser.
Sebastian Harl [Tue, 19 May 2015 18:10:22 +0000 (20:10 +0200)]
Drop the old frontend parser.

It's fully replaced by the new parser module now.

7 years agostore: Add sdb_store_query_prepare_matcher().
Sebastian Harl [Tue, 19 May 2015 18:08:56 +0000 (20:08 +0200)]
store: Add sdb_store_query_prepare_matcher().

This prepares a logical expression described by an AST for execution as a
store matcher. This is useful for anything that uses the lower level store
lookup functions.

7 years agofrontend: Drop sdb_fe_store_* in favor of sdb_store_query_execute.
Sebastian Harl [Mon, 18 May 2015 21:57:06 +0000 (23:57 +0200)]
frontend: Drop sdb_fe_store_* in favor of sdb_store_query_execute.

Instead, build a temporary AST to represent the command to be executed.

7 years agofrontend: Drop sdb_fe_exec_* in favor of sdb_store_query_execute.
Sebastian Harl [Mon, 18 May 2015 21:14:54 +0000 (23:14 +0200)]
frontend: Drop sdb_fe_exec_* in favor of sdb_store_query_execute.

Instead, build a temporary AST to represent the command to be executed.

7 years agoRemove (now) usued sdb_fe_exec_timeseries().
Sebastian Harl [Mon, 18 May 2015 20:50:19 +0000 (22:50 +0200)]
Remove (now) usued sdb_fe_exec_timeseries().

7 years agofrontend/query_test: Add tests for the lower level functions.
Sebastian Harl [Mon, 18 May 2015 20:48:57 +0000 (22:48 +0200)]
frontend/query_test: Add tests for the lower level functions.

7 years agofrontend/query: Split AST execution into a separate function.
Sebastian Harl [Mon, 18 May 2015 19:18:40 +0000 (21:18 +0200)]
frontend/query: Split AST execution into a separate function.

7 years agostore: Use a separate type for prepared querys.
Sebastian Harl [Mon, 18 May 2015 19:04:18 +0000 (21:04 +0200)]
store: Use a separate type for prepared querys.

It's sufficiently different from the general matchers/filters approach to not
benefit from sharing a base type.

7 years agostore, frontend: Add sdb_store_query_execute use it instead of sdb_fe_exec.
Sebastian Harl [Sun, 17 May 2015 19:58:03 +0000 (21:58 +0200)]
store, frontend: Add sdb_store_query_execute use it instead of sdb_fe_exec.

This new function executes a generic QUERY matcher as returned by
sdb_store_query_prepare and writes the reply to a string buffer.

7 years agoMerged branch 'master' of git://
Sebastian Harl [Fri, 15 May 2015 20:53:44 +0000 (22:53 +0200)]
Merged branch 'master' of git://

7 years agofrontend/query_test: Test various QUERY functions.
Sebastian Harl [Fri, 15 May 2015 20:41:43 +0000 (22:41 +0200)]
frontend/query_test: Test various QUERY functions.

These will, in turn, call the sdb_fe_exec_<CMD> functions, thus guaranteeing
good test coverage.

7 years agofrontend: Fixed reply from STORE command.
Sebastian Harl [Fri, 15 May 2015 20:40:00 +0000 (22:40 +0200)]
frontend: Fixed reply from STORE command.

7 years agostore: Fixed a memory leak in fetch_timeseries().
Sebastian Harl [Fri, 15 May 2015 20:39:26 +0000 (22:39 +0200)]
store: Fixed a memory leak in fetch_timeseries().

7 years agofrontend, parser: Allow typed access to host objects from any context.
Sebastian Harl [Fri, 15 May 2015 19:41:14 +0000 (21:41 +0200)]
frontend, parser: Allow typed access to host objects from any context.

That is, even from the "generic" or "filter" contexts.

7 years agostore: Add sdb_store_query_prepare().
Sebastian Harl [Fri, 15 May 2015 08:03:47 +0000 (10:03 +0200)]
store: Add sdb_store_query_prepare().

This function prepares a query, represented by its AST, for execution in a
store by generating a store matcher.

7 years agostore: Store a service/metric's parent hostname as an attribute.
Sebastian Harl [Thu, 14 May 2015 22:43:12 +0000 (00:43 +0200)]
store: Store a service/metric's parent hostname as an attribute.

7 years agostore: Fixed handling of metric store values.
Sebastian Harl [Thu, 14 May 2015 22:41:12 +0000 (00:41 +0200)]
store: Fixed handling of metric store values.

 - Call sdb_plugin_store_metric() even if store=NULL (don't return early).
 - Don't drop old values if strdup failed when storing store type/id.
 - Fixed a segfault in sdb_plugin_store_metric() when using store=NULL.

7 years agoparser/analyzer: Fixed iterator type checks.
Sebastian Harl [Fri, 8 May 2015 16:49:59 +0000 (18:49 +0200)]
parser/analyzer: Fixed iterator type checks.

Also, added some more test-cases covering affected cases.

7 years agot/coverage: Ignore parser/scanner and parser/grammar.
Sebastian Harl [Wed, 6 May 2015 22:32:35 +0000 (00:32 +0200)]
t/coverage: Ignore parser/scanner and parser/grammar.

7 years agot/Makefile: Update EXTRA_DIST based on recent changes.
Sebastian Harl [Wed, 6 May 2015 22:27:32 +0000 (00:27 +0200)]
t/Makefile: Update EXTRA_DIST based on recent changes.

7 years agoparser/analyzer: Migrate value expression checks.
Sebastian Harl [Wed, 6 May 2015 22:01:42 +0000 (00:01 +0200)]
parser/analyzer: Migrate value expression checks.

The new parser and analyzer now pass the full test-suite of frontend/parser.

7 years agoparser/analyzer: Migrate type and iterator checks.
Sebastian Harl [Wed, 6 May 2015 21:33:52 +0000 (23:33 +0200)]
parser/analyzer: Migrate type and iterator checks.

7 years agoparser: Add support for analyzing conditional and arithmetic expressions.
Sebastian Harl [Tue, 5 May 2015 22:15:49 +0000 (00:15 +0200)]
parser: Add support for analyzing conditional and arithmetic expressions.

Let all parser functions call the respective analyzer. For now, this is only
used to propagate data-type information but it will later ensure a certain
amount of semantical correctness. Note that the new analyzers usually don't
have any context information, so they might accept expressions that are not
right for their later target use case. If that matters, the caller will have
to check again providing the right context.

7 years agoparser: Convert AST op types to data op types when necessary.
Sebastian Harl [Tue, 5 May 2015 22:15:09 +0000 (00:15 +0200)]
parser: Convert AST op types to data op types when necessary.

7 years agoparser: Determine the data-type of each node.
Sebastian Harl [Tue, 5 May 2015 21:52:41 +0000 (23:52 +0200)]
parser: Determine the data-type of each node.

For now, we only use this for arithmetic expressions. The field will be
populated by the analyzer.

7 years agoparser: Fixed setup of iterator nodes.
Sebastian Harl [Tue, 5 May 2015 21:36:14 +0000 (23:36 +0200)]
parser: Fixed setup of iterator nodes.

The iterator value was supposed to be an "incomplete operator" node, that is,
one of the operands should be NULL. This is actually the case now and this
also means we don't have to store the operator type separately.

7 years agoparser/ast: Add some helper defines.
Sebastian Harl [Tue, 5 May 2015 21:33:04 +0000 (23:33 +0200)]
parser/ast: Add some helper defines.

7 years agoMigrate top-level checks to the new parser/analyzer.
Sebastian Harl [Wed, 15 Apr 2015 09:38:26 +0000 (11:38 +0200)]
Migrate top-level checks to the new parser/analyzer.

Call the analyzer from sdb_parser_parse().

7 years agoparser_test: Make sure that TIMESERIES end times are greater than start times.
Sebastian Harl [Wed, 15 Apr 2015 09:29:55 +0000 (11:29 +0200)]
parser_test: Make sure that TIMESERIES end times are greater than start times.

7 years agoparser/grammar: Fix the hostname in a 'FETCH host' node.
Sebastian Harl [Wed, 15 Apr 2015 09:28:53 +0000 (11:28 +0200)]
parser/grammar: Fix the hostname in a 'FETCH host' node.

7 years agoMigrate parser from frontend/ to parser/ and to use the AST.
Sebastian Harl [Sun, 12 Apr 2015 13:12:45 +0000 (15:12 +0200)]
Migrate parser from frontend/ to parser/ and to use the AST.

The new parser now returns AST nodes instead of a "compiled" store lookup
operator. The old parser is still in place unmodified and currently still in

7 years agoparser/ast: Introduce a data-structure representing a SysQL AST.
Sebastian Harl [Sun, 12 Apr 2015 12:45:49 +0000 (14:45 +0200)]
parser/ast: Introduce a data-structure representing a SysQL AST.

This will be used by the parser in the future.

7 years agofrontend/parser: Renamed SDB_PARSE_EXPR to SDB_PARSE_ARITH.
Sebastian Harl [Sat, 11 Apr 2015 16:04:27 +0000 (18:04 +0200)]
frontend/parser: Renamed SDB_PARSE_EXPR to SDB_PARSE_ARITH.

That's a bit more specific ;-)

7 years agobuild system: Fix VPATH (out-of-tree) builds.
Sebastian Harl [Sat, 11 Apr 2015 13:56:04 +0000 (15:56 +0200)]
build system: Fix VPATH (out-of-tree) builds.

7 years agot/cibuild: Ignore missing field initializer warnings for tests.
Sebastian Harl [Sun, 15 Mar 2015 15:18:23 +0000 (11:18 -0400)]
t/cibuild: Ignore missing field initializer warnings for tests.

Old versions of clang and gcc complain about { 0 } initializers even though
they are well defined by C99.

7 years agoquery language: Add support for attribute.value access.
Sebastian Harl [Sun, 15 Mar 2015 14:54:21 +0000 (10:54 -0400)]
query language: Add support for attribute.value access.