浏览代码

fix references to postgres datatypes

Sven Klemm 7 年之前
父节点
当前提交
aae21a631e

+ 1 - 1
public/app/plugins/datasource/mysql/mysql_query.ts

@@ -97,7 +97,7 @@ export default class MysqlQuery {
   }
 
   hasUnixEpochTimecolumn() {
-    return ['int4', 'int8', 'float4', 'float8', 'numeric'].indexOf(this.target.timeColumnType) > -1;
+    return ['int', 'bigint', 'double'].indexOf(this.target.timeColumnType) > -1;
   }
 
   buildTimeColumn(alias = true) {

+ 1 - 1
public/app/plugins/datasource/mysql/query_ctrl.ts

@@ -511,7 +511,7 @@ export class MysqlQueryCtrl extends QueryCtrl {
               .then(this.transformToSegments({}))
               .catch(this.handleQueryError.bind(this));
           case 'right':
-            if (['int4', 'int8', 'float4', 'float8', 'timestamp', 'timestamptz'].indexOf(part.datatype) > -1) {
+            if (['int', 'bigint', 'double', 'datetime'].indexOf(part.datatype) > -1) {
               // don't do value lookups for numerical fields
               return this.$q.when([]);
             } else {