Repository navigation
v1.2.1
Plugin ID: lumingsun-kwdbtsdb-datasource
Version: 1.2.1
Security
- Every pooled connection now starts with
default_transaction_read_only = on
and astatement_timeout(default 30s, configurable), so a statement that
slips past the lexical check still cannot write and runaway queries are
cancelled. - The read-only guard now understands
E'...'escape strings, dollar quoting
and nested block comments, closing a multi-statement bypass, and rejects
internal management catalogs (kwdb_internal.*,crdb_internal.*) and
side-effecting functions (pg_sleep,pg_read_file,nextval,
set_config, ...). SHOWis restricted to schema-oriented forms so cluster/session state is not
exposed.- Connection URLs in error messages are redacted; read-only and TLS guidance was
added to the README.
Fixed
$__timeFilterand$__timeGroupnow expand through a paren-matching
scanner:CAST(...)and nested function arguments no longer produce broken
SQL, and every expansion is parenthesised soNOT $__timeFilter(x)keeps its
meaning.- Reaching the row cap now cancels the running query instead of draining the
whole result set. - Database errors raised while scanning rows are reported as downstream errors
instead of plugin errors. - Gapfill
constantmode now emits a numeric constant; interpolation modes use
KWDB's accepted lower-case names (legacyPREV/NEXT/NULLvalues are
normalised). - Latest-values queries use
first()/last()for the time column to match the
selected function, so values and timestamps no longer disagree. datecolumns map to Grafana time fields, anduuid/interval/timevalues
render as readable strings instead of Go representations.- A time series query now fails with a clear message when the configured time
column is missing or containsNULLvalues. - Metadata parsing ignores table-level clauses (
INDEX,CONSTRAINT,
FOREIGN KEY, ...) so the column picker no longer offers phantom columns. - Template-variable tag values are capped at 10,000 entries.
- An empty query returns an explicit "query is empty" message instead of a
read-only rejection.
Changed
queryTimeoutandmaxRowscan be configured per data source.plugin.jsonno longer declaresqueryOptionsthat were never read, and the
minimum Grafana version is 13.1.0 (the version the plugin is built and tested
against).