Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

Commit

Permalink
remove max_rows_to_read
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Rabaut authored and briandennis committed Dec 19, 2018
1 parent 95c1449 commit b208c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
10 changes: 1 addition & 9 deletions app/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,6 @@ export const CONNECTION_CONFIG = {
'description': 'Server port number (e.g. 8123)'
},
{'label': 'Database', 'value': 'database', 'type': 'text'},
{
'label': 'Max rows to read',
'value': 'max_rows_to_read',
'type': 'number',
'description': 'Maximum number of rows that can be read from a table when running a query. \
By default, all rows can be read.'
},
{
'label': 'Read only',
'value': 'readonly',
Expand Down Expand Up @@ -534,8 +527,7 @@ export const SAMPLE_DBS = {
password: 'connecttoplotly',
host: 'clickhouse.test.plotly.host',
port: 8123,
database: 'plotly_datasets',
max_rows_to_read: 1000
database: 'plotly_datasets'
}
};

Expand Down
5 changes: 2 additions & 3 deletions backend/persistent/datastores/clickhouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ import ClickHouse from '@apla/clickhouse';
* @param {String} database database name
* @returns {Object} ClickHouse client
*/
function createClient({ host, port, https, username, password, database, readonly, max_rows_to_read }) {
function createClient({ host, port, https, username, password, database, readonly }) {
return new ClickHouse({
host,
port,
protocol: https ? 'https:' : 'http:',
auth: `${username || 'default'}:${password}`,
queryOptions: {
database,
readonly: readonly ? 1 : 0,
...(max_rows_to_read && { max_rows_to_read })
readonly: readonly ? 1 : 0
}
});
}
Expand Down

0 comments on commit b208c6e

Please sign in to comment.