Commit Graph

16 Commits

Author SHA1 Message Date
Marcus Efraimsson
d90d4ce55d
Merge pull request #12402 from AustinWinstanley/macros/sql
mysql,mssql: improve $__timeFilter, $__timeFrom, $__timeTo macros

The $__timeFilter macro now uses a BETWEEN with timestamps instead of 
comparing epochs
The $__timeFrom and $__timeTo macros now return strings of format 
YYYY-MM-DDThh:mm:ssZ instead of epoch
2018-07-04 20:01:43 +02:00
Sven Klemm
f017c04a65 [mssql] fix $__timeGroup rounding (#12470)
* fix $__timeGroup rounding for mssql

* revert enabling of mssql integration tests
2018-07-01 06:57:02 -07:00
Austin Winstanley
a0e8437f8f Used PostgreSQL TSDB as a model the set up the __timeFilter, __timeFrom, and __timeTo macros for Microsoft SQL and MySQL 2018-06-29 03:48:14 +00:00
Austin Winstanley
105b3d6804 Switched MySQL and MSSQL macros for timeFilter and related to use BETWEEN and calculate UNIX time server side instead of database side. Fixes #11618 #11619 2018-06-25 20:11:58 +00:00
Marcus Efraimsson
a86ee304ff
tsdb: remove unnecessary type casts in sql data sources macro engines 2018-04-12 19:08:35 +02:00
Marcus Efraimsson
f5586b1270
tsdb: sql data sources should handle time ranges before epoch start correctly 2018-04-12 18:53:12 +02:00
ryan
920a0c4fec skip mssql fix 2018-04-09 13:49:13 +02:00
ryan
7d6c8aa612 add mssql and mysql 2018-04-09 13:34:35 +02:00
Marcus Efraimsson
b0076d4f65 mssql: remove UTC conversion in macro functions
Removes the macro function . Macro functions should not do UTC/timezone conversion - they should
work in the same way as postgres and mysql datasource implementations.
Grafana and Microsft SQL Server should be run on servers with UTC timezones.
2018-03-22 14:55:44 +01:00
Marcus Efraimsson
3ccadff800 mssql: fix timeGroup macro so that it properly creates correct groups
Earlier the division of interval was done using whole numbers resulting in that important information
was lost/too many time series merged to the same group. Now using division of floating point and rounding
up to solve the problem
2018-03-22 14:49:40 +01:00
Marcus Efraimsson
d14946a135 mssql: cleanup and minor refactor 2018-03-19 13:32:04 +01:00
Leonard Gram
571556e1d8 mssql: adds fill to timeGroup macro. 2018-03-15 13:11:26 +01:00
Marcus Efraimsson
c87752102a mssql datasource: support for timeGroup macro function 2018-03-13 22:49:49 +01:00
Marcus Efraimsson
d4beee2bb0 Merge branch 'master' into mssql_datasource 2018-03-13 16:03:02 +01:00
linux chips
6e7a067857 adding support for sgl native time datatypes 2017-12-12 23:43:24 +03:00
linux chips
c75f9a1923 MSSQL Data Source 2017-12-02 14:40:12 +03:00