Dan Sosedoff
4e3e255575
Configure timeout and retries when testing connection status ( #623 )
2022-12-19 16:13:43 -06:00
Dan Sosedoff
0cd61093b9
Display empty schemas on the sidebar ( #621 )
...
* Display empty schemas on the sidebar
* Add schemas fetching test
* Skip pg_temp schemas
* Exclude pg_temp tables from other queries
2022-12-19 13:26:13 -06:00
Dan Sosedoff
69233cd769
Establish connections using bookmark ID only ( #619 )
...
* Establish connections using bookmark ID only
* Refactor specs
* Extra tests
* Fix homedir assertion for bookmarks path
* Fix newline in the warning message
* Check for bookmark file existence before reading
* Connect code restructure
2022-12-19 12:33:13 -06:00
Dan Sosedoff
0dfec506cf
Improved Pg test matrix ( #616 )
...
* Add postgres 10/11 to test matrix
* Add docker-compose file fo running multiple postgres versions locally
* Fix client test for pg 10, modify function details to include specific fields
* Try to install latest postgres client
* Add concurrency setting
2022-12-12 18:58:00 -06:00
Dan Sosedoff
4c40eef99a
Perform client version validation before executing pg_dump command ( #614 )
...
* Add func to parse out pg_dump version
* Perform client vs server version checking before dump exports
* Fix dump tests
* Add extra test to validate against empty server version
* Fix attachment filenames cleanup function
* Add extra test
* Fix small typos in comments
* Drop third-party package to deal with versions
* Tweak the pg dump incompatibility error message
* Run CI on pull requests
2022-12-12 15:09:12 -06:00
Dan Sosedoff
0008842a68
Add test for server type and version detection ( #612 )
2022-12-08 13:33:38 -06:00
Dan Sosedoff
d08dbf34aa
Implement global query timeout option ( #609 )
...
* Add global query timeout
* Tweak option settings
* Add timeout test
* Move query timeout option close to idle timeout
2022-12-07 18:56:58 -06:00
Dan Sosedoff
38051b9465
Add support for user functions ( #608 )
...
* Add initial support for functions
* Show functions definitions
* Fix client tests
* Fix schema objects search
* Perform partial matching for functions
* Add function test
* Make sure to close client connections so that database could be dropped in tests
* Fix lint
* Allow to copy the view/functions definitions
* Nits
2022-12-07 11:58:07 -06:00
Dan Sosedoff
f48cc5f007
Use go embed to load queries from static files ( #607 )
2022-12-06 17:41:46 -06:00
Dan Sosedoff
be81fdab41
Fix panic with time marshalling
2022-12-05 21:47:39 -06:00
Dan Sosedoff
e3d69d3cfa
Fix lint
2022-12-05 21:01:08 -06:00
Dan Sosedoff
450badfbbb
Handle returning values in update/delete queries
2022-12-05 20:56:21 -06:00
Dan Sosedoff
96f82201b5
Fix indexes test
2022-12-03 16:31:07 -06:00
Dan Sosedoff
16726e2461
Add idle timeout into session manager
2022-12-02 14:20:20 -06:00
Dan Sosedoff
73dfcc46c3
Verify client is closed
2022-12-02 13:59:22 -06:00
Dan Sosedoff
9074d4bfb8
Add internal sessions manager
2022-12-02 13:36:31 -06:00
Dan Sosedoff
f19f165afc
Configure logger for connect backend
2022-12-02 11:45:23 -06:00
Dan Sosedoff
f9e376a117
Code cleanup; add make lint task
2022-12-01 16:51:12 -06:00
Dan Sosedoff
9bfec11b48
Fix linting errors
2022-11-14 16:10:50 -06:00
Dan Sosedoff
c706523bd0
Lint: replace ioutil with os package
2022-11-14 15:47:36 -06:00
Matthieu Vachon
5803295174
Added binary codec base58
as well as improving the help for --binary-codec
flag ( #548 )
...
* Added binary codec `base58` as well as improving the help for `--binary-codec` flag
* Added tests for base58
* Fixed tests
Co-authored-by: Matthieu Vachon <matt@streamingfast.io>
2022-01-27 22:10:01 -06:00
Dan Sosedoff
706caa44bf
Serialize binary bytea cols into hex/base64 ( #537 )
...
- Adds binary serialization into hex/base64
- Default codec is base64
- Codec can be changed via `--binary-codec` CLI option
2021-12-29 11:03:50 -06:00
Dan Sosedoff
86b1ea887c
Adjust error message matching for dump spec
2020-10-18 10:18:03 -05:00
Dan Sosedoff
8428d268b1
Lint
2019-11-02 13:00:23 -05:00
Dan Sosedoff
7475f398b1
Add support for encrypted ssh keys
2019-11-02 12:44:04 -05:00
Dan Sosedoff
994ceca1d1
Return error when ssh key does not exist
2019-11-02 11:36:31 -05:00
Dan Sosedoff
7a6450091a
Code formatting and cleanup ( #442 )
...
* Formatting, extract error messages
* More refactor
* Move errors to a separate file
* Add missing file
* Misc
2019-09-29 12:16:42 -05:00
Dan Sosedoff
b6f01da232
Drop unsupported pg_dump options from connection string
2019-09-25 20:29:21 -05:00
Dan Sosedoff
2a0fd54855
Remove comments from the query before checking for restricted keywords
2019-02-25 11:43:04 -06:00
Dan Sosedoff
b83f52707a
Remove LOCK/SET from restricted keywords
2019-02-20 20:29:28 -06:00
Dan Sosedoff
5bb6378e94
Switch back readonly mode after test finish
2019-02-20 18:22:44 -06:00
Dan Sosedoff
40eb74529e
Reject queries that contain restricted keywords in read-only mode
2019-02-20 18:20:27 -06:00
Dan Sosedoff
65aae5ec95
Add extra test cases for camelCase table names
2019-02-08 14:02:36 -06:00
Dan Sosedoff
5af4332593
Fix SQL query for camelCase tables row estimation
2019-02-08 13:27:40 -06:00
Dan Sosedoff
2bd9f39da5
Fix SSH error: ssh: must specify HostKeyCallback
2018-12-14 19:56:33 -06:00
Dan Sosedoff
c9d94b54d7
Merge pull request #394 from sosedoff/fix-row-estimation
...
Fix row estimation bug
2018-12-12 14:33:06 -06:00
Dan Sosedoff
7917c2ad35
Simplify TableRowsCount func logic
2018-12-12 13:56:08 -06:00
Dan Sosedoff
2db5ce544f
Fix row estimation bug
...
The variable `table` is mutated from `schema.tablename` to `tablename`
before being passed to other functions, which try to parse the schema
from the name. This results in schema name being `public` because it's
missing from the given table name.
2018-12-12 13:33:55 -06:00
Dan Sosedoff
474b99c6d5
Print out failed query SQL and args with --debug flag
2018-12-12 13:22:36 -06:00
Dan Sosedoff
d1a7e6ecfe
More lint
2018-12-04 12:42:37 -06:00
Dan Sosedoff
903a265676
Fix JSON marshal panic when dealing with NaN values
2018-11-27 16:51:51 -06:00
Dan Sosedoff
dc4e8598f7
Refactor building connection string from options
2018-09-13 22:44:11 -05:00
Eric Dagenais
9bb3afe6ce
Merge remote-tracking branch 'upstream/master' into itn/tables-quotes-2
...
# Conflicts:
# pkg/client/client.go
2018-06-20 07:19:34 -07:00
Allisson Azevedo
808f6eea33
Change EstimatedTableRowsCount query
2018-06-16 18:12:11 -03:00
Allisson Azevedo
974570c79e
Add more tests
2018-06-16 11:09:37 -03:00
Allisson Azevedo
5ba53d3cbd
Add test_EstimatedTableRowsCount
2018-06-14 17:51:16 -03:00
Allisson Azevedo
8748f07167
Use EstimatedTableRowsCount only for postgresql
2018-06-14 16:36:22 -03:00
Allisson Azevedo
d603b293d8
Add EstimatedTableRowsCount to avoid count in large tables
2018-06-14 16:10:59 -03:00
Dan Sosedoff
108754a8c3
Verify that database name is specified when opening the connection
2018-06-05 22:31:22 -05:00
Dan Sosedoff
1cbcb73948
Print a correct database server name when starting
2018-06-05 18:28:22 -05:00