Add DBVersion #1723

Merged
lunny merged 7 commits from lunny/version into master 2021-06-12 07:06:06 +00:00
Owner
No description provided.
lunny added the
kind
enhancement
label 2020-06-24 13:21:41 +00:00
lunny added 1 commit 2020-06-24 13:21:44 +00:00
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
05c0fe2e30
Add DBVersion
6543 reviewed 2020-06-24 14:49:47 +00:00
Dismissed
@ -786,4 +786,2 @@
}
// Table table struct
type Table struct {
Contributor

this rm looks unrelated

this rm looks unrelated
Author
Owner

Yes, this is unused codes.

Yes, this is unused codes.
lunny marked this conversation as resolved
Contributor

from CI:

  • Postgress: 9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
  • Sqlite3: 3.31.1
  • MySQL: 5.7.29
  • MSSQL: Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
  • TiDB: 5.7.25-TiDB-v3.0.3
  • CockroachDB: CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built

I dont know if it should return the full string or only the real version number ...

from CI: * Postgress: `9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit` * Sqlite3: `3.31.1` * MySQL: `5.7.29` * MSSQL: `Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)` * TiDB: `5.7.25-TiDB-v3.0.3` * CockroachDB: `CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built` I dont know if it should return the full string or only the real version number ...
Author
Owner

from CI:

  • Postgress: 9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
  • Sqlite3: 3.31.1
  • MySQL: 5.7.29
  • MSSQL: Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
  • TiDB: 5.7.25-TiDB-v3.0.3
  • CockroachDB: CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built

I dont know if it should return the full string or only the real version number ...

It's difficult to parse? ?

> from CI: > > * Postgress: `9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit` > * Sqlite3: `3.31.1` > * MySQL: `5.7.29` > * MSSQL: `Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) > Nov 30 2018 12:57:58 > Copyright (C) 2017 Microsoft Corporation > Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)` > * TiDB: `5.7.25-TiDB-v3.0.3` > * CockroachDB: `CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built` > > I dont know if it should return the full string or only the real version number ... It's difficult to parse? ?
Contributor

I'll thought about it ... but in the end I think the user has to parse this itself because we cant realy tell what exat info he like to have ...

on MSSQL for example, he might like to get the patch number (KB4466404) or just the name of the "generel" version (Microsoft SQL Server 2017) ...

so for me I come to the conclusion that this output should be ok

I'll thought about it ... but in the end I think the user has to parse this itself because we cant realy tell what exat info he like to have ... on MSSQL for example, he might like to get the patch number (KB4466404) or just the name of the "generel" version (Microsoft SQL Server 2017) ... so for me I come to the conclusion that this output should be ok
6543 approved these changes 2020-06-25 03:21:11 +00:00
Dismissed
Contributor

Ping

Ping
lunny added 1 commit 2020-06-27 02:08:12 +00:00
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
88fe939758
Merge branch 'master' into lunny/version
Author
Owner

I think we should parse it on xorm layer. So that we should get the version like this.

Postgress: 9.5.22
Sqlite3: 3.31.1
MySQL: 5.7.29
MSSQL: 14.0.3048.4
TiDB: 3.0.3
CockroachDB: 19.2.4
I think we should parse it on xorm layer. So that we should get the version like this. ``` Postgress: 9.5.22 Sqlite3: 3.31.1 MySQL: 5.7.29 MSSQL: 14.0.3048.4 TiDB: 3.0.3 CockroachDB: 19.2.4 ```
lunny force-pushed lunny/version from babca38d2d to ee8327d364 2021-06-06 11:47:09 +00:00 Compare
Contributor

rows.go:13:2: xorm.io/builder@v0.3.8: Get "https://goproxy.io/xorm.io/builder/@v/v0.3.8.zip": read tcp 172.19.0.3:49170->119.28.201.50:443: read: connection reset by peer
make: *** [Makefile:151: test-mssql] Error 1

rows.go:13:2: xorm.io/builder@v0.3.8: Get "https://goproxy.io/xorm.io/builder/@v/v0.3.8.zip": read tcp 172.19.0.3:49170->119.28.201.50:443: read: connection reset by peer make: *** [Makefile:151: test-mssql] Error 1
lunny force-pushed lunny/version from 7bc6fe5165 to 47710175c6 2021-06-09 04:56:06 +00:00 Compare
lunny added this to the 1.1.1 milestone 2021-06-09 05:02:24 +00:00
lunny force-pushed lunny/version from 7ecc85926b to 6d24d15e11 2021-06-09 10:13:39 +00:00 Compare
lunny force-pushed lunny/version from 6d24d15e11 to e76b98c444 2021-06-10 15:34:07 +00:00 Compare
6543 reviewed 2021-06-10 16:04:32 +00:00
@ -191,0 +204,4 @@
return nil, err
}
if strings.HasPrefix(version, "TiDB:") {
Contributor

make sure with regex, strings.Split do have 3 items or we could get out of range exeptions

and use it to make sure its TiDB in the same time :)

make sure with regex, strings.Split do have 3 items or we could get out of range exeptions and use it to make sure its TiDB in the same time :)
Author
Owner

The rule is simple, three fields with -. So I don't think we need regex here.

The rule is simple, three fields with `-`. So I don't think we need regex here.
lunny marked this conversation as resolved
lunny force-pushed lunny/version from e76b98c444 to edb5cdc2bb 2021-06-12 02:51:39 +00:00 Compare
lunny force-pushed lunny/version from ff0e803343 to c8144bd716 2021-06-12 05:57:08 +00:00 Compare
lunny merged commit 7fd6356a85 into master 2021-06-12 07:06:06 +00:00
lunny referenced this issue from a commit 2021-06-12 07:06:06 +00:00
lunny deleted branch lunny/version 2021-06-12 07:06:23 +00:00
Sign in to join this conversation.
No description provided.