mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
Merge pull request #1139 from dbgate/feature/duckdb-1132
Feature/duckdb 1132
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"start:api": "yarn workspace dbgate-api start | pino-pretty",
|
||||
"start:api:watch": "nodemon --watch 'src/**' --ext 'ts,json,js' --exec yarn start:api",
|
||||
"start:api:json": "yarn workspace dbgate-api start",
|
||||
"start:app": "cd app && yarn start | pino-pretty",
|
||||
"start:app:singledb": "CONNECTIONS=con1 SERVER_con1=localhost ENGINE_con1=mysql@dbgate-plugin-mysql USER_con1=root PASSWORD_con1=Pwd2020Db SINGLE_CONNECTION=con1 SINGLE_DATABASE=Chinook yarn start:app",
|
||||
|
||||
@@ -51,17 +51,15 @@ function _normalizeValue(value) {
|
||||
}
|
||||
|
||||
if (value instanceof DuckDBDateValue) {
|
||||
const year = value.year;
|
||||
const month = String(value.month).padStart(2, '0');
|
||||
const day = String(value.day).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
if (value instanceof DuckDBTimeValue) {
|
||||
const hour = String(value.hour).padStart(2, '0');
|
||||
const minute = String(value.min).padStart(2, '0');
|
||||
const second = String(value.sec).padStart(2, '0');
|
||||
const micros = String(value.micros).padStart(6, '0').substring(0, 3);
|
||||
const parts = value.toParts();
|
||||
const hour = String(parts.hour).padStart(2, '0');
|
||||
const minute = String(parts.min).padStart(2, '0');
|
||||
const second = String(parts.sec).padStart(2, '0');
|
||||
const micros = String(parts.micros).padStart(6, '0').substring(0, 3);
|
||||
return `${hour}:${minute}:${second}.${micros}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user