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
Dan Sosedoff
e09f892442
Fix table info call, just return placeholder for now
2018-06-05 16:38:00 -05:00
Dan Sosedoff
56f3b45a4e
Fix activity list
2018-06-05 15:48:16 -05:00
Dan Sosedoff
77770112bd
Detect server type and version with regular expression
2018-06-05 15:35:19 -05:00
Dan Sosedoff
e2be689a05
Check if pg_dump is available before running database export
2018-04-25 23:29:18 -05:00
Eric Dagenais
7b3e99b599
fixes issue that generates an error message when getting table info, getting table schema, and exporting data for tables with uppercase letters
2018-04-11 06:24:56 -07:00
Dan Sosedoff
47500bf92e
Specs refactor and tweaks
...
- Make ParseOptions func to take an arg and return struct so we can test it
- Refactor and add more tests for options parsing
- Run test suite on postgres 10.x branch
- Change format for connection idle timer from float64 to in
2018-02-22 14:20:18 -06:00
Dan Sosedoff
b0146a5a76
Update test case to handle the constraint result rows
2018-01-30 22:41:12 -06:00
ldinc
38a3f01868
#282 : set flag idle logic to cli-run phase
2017-10-15 01:39:07 +03:00
ldinc
d4dde3fe4f
#282 fix disabled state per idle timeout
2017-10-14 03:15:31 +03:00
ldinc
3067b06bf6
#282 : added timeout flags & tuned client.IsIdle()
2017-10-14 03:08:04 +03:00
Dan Sosedoff
b1dd4b5308
Add new CLI option to disable SSH connections
2017-09-26 23:56:27 -05:00
Dan Sosedoff
5e22795828
Allow setting ssh connection key file, fix connection ui
2017-09-26 23:29:28 -05:00
Dan Sosedoff
62d88121cd
Automatically close idle sessions
2017-09-22 22:44:32 -05:00
Dan Sosedoff
5d1cc211b0
Add database export test
2017-09-22 22:06:36 -05:00
Dan Sosedoff
73816ff2d7
Add ability to connect with settings from third-party backend
2017-09-19 00:43:21 -05:00
Dan Sosedoff
f5f595ac02
Merge pull request #270 from sosedoff/data-export
...
Database export
2017-09-19 00:41:04 -05:00
Dan Sosedoff
26ea9fc1b8
Fix the JSON beautifier flag
2017-09-16 21:57:04 -05:00
Dan Sosedoff
e771d6f49e
Export database or table to sql
2017-09-16 20:32:41 -05:00
Dan Sosedoff
6ab30ed308
Update the client last usage timestamp
2017-09-14 00:16:40 -05:00
Dan Sosedoff
3a9bb58646
Merge pull request #264 from sosedoff/print-version-on-start
...
Print postgres version on start in a single-session mode
2017-09-14 00:00:21 -05:00
Dan Sosedoff
af7e504e4f
Print postgres version on start in a single-session mode
2017-09-13 23:42:44 -05:00
Dan Sosedoff
d786d0018e
Make JSON formatting a feature flag, enabled by default
2017-09-13 23:27:54 -05:00
Dan Sosedoff
e44e66a8e8
Use indent marshaller for JSON results by default
2017-08-04 22:10:12 -05:00