SQL support
SignalSQL implements a practical subset of SQL through a Flex/Bison parser. This page summarises what you can rely on today. Because the server speaks the MySQL wire protocol, statements are issued exactly as they would be against MySQL.
Data statements
SELECT— projection,WHERE, andSELECT DISTINCT. Prepared statements and parameter binding are supported.INSERT—INSERT INTO <table> VALUES (...).UPDATE—UPDATE <table> SET col = ... WHERE ....DELETE—DELETE FROM <table> WHERE ....
SELECT * FROM INPUT;
SELECT DISTINCT Name FROM INPUT;
UPDATE setpoints SET Value = 67.0 WHERE Name = 'hlt';
DELETE FROM PID WHERE ID = 1;
SELECT DISTINCTpreserves first-seen row order and powers Grafana template variable dropdowns built fromSELECT DISTINCT col ….
Schema statements
CREATE TABLEwith column types and aPRIMARY KEY.- The
REFERENCEcolumn attribute (see Built-in tables and references). DROP TABLE.
CREATE TABLE test2 (
ID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(255),
Value double REFERENCE
);
DROP TABLE test2;
Not supported: SignalSQL has a single database (
main) —CREATE DATABASEis unavailable — and does not supportCREATE VIEW. See Limitations.
Introspection
SHOW TABLESlists base tables, including the tables exposed by hardware modules.- An
INFORMATION_SCHEMA-style system catalog is bootstrapped at first run, so standard tooling (phpMyAdmin, Grafana) can introspect the schema.
Types
Common column types are available, including integer types, DOUBLE, and
VARCHAR(n). A DOUBLE REFERENCE column is the usual choice for values that
resolve to a numeric sensor reading or another column.
Storage
Tables are backed by LMDB for durability; the engine also uses in-memory tables for query results and scratch data. See Configuration for the data directory.
Prepared statements
Prepared statements work over the MySQL protocol, so client-side placeholders
(?) bind as expected — including when reading through a REFERENCE column,
where the resolved value is returned with its native type.