Fix table info call, just return placeholder for now

This commit is contained in:
Dan Sosedoff 2018-06-05 16:38:00 -05:00
parent 56f3b45a4e
commit e09f892442
2 changed files with 10 additions and 0 deletions

View File

@ -228,6 +228,9 @@ func (client *Client) TableRowsCount(table string, opts RowsOptions) (*Result, e
}
func (client *Client) TableInfo(table string) (*Result, error) {
if client.serverType == cockroachType {
return client.query(statements.TableInfoCockroach)
}
return client.query(statements.TableInfo, table)
}

View File

@ -73,6 +73,13 @@ SELECT
pg_size_pretty(pg_total_relation_size($1)) AS total_size,
(SELECT reltuples FROM pg_class WHERE oid = $1::regclass) AS rows_count`
TableInfoCockroach = `
SELECT
'n/a' AS data_size,
'n/a' AS index_size,
'n/a' AS total_size,
'n/a' AS rows_count`
// ---------------------------------------------------------------------------
TableSchema = `