show table row count for MySQL

This commit is contained in:
Jan Prochazka
2022-02-10 16:07:44 +01:00
parent 0debe66dd0
commit 4e221ecd3a
9 changed files with 69 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ module.exports = `
select
TABLE_NAME as pureName,
TABLE_TYPE as objectType,
TABLE_ROWS as tableRowCount,
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
from information_schema.tables
where TABLE_SCHEMA = '#DATABASE#'

View File

@@ -1,6 +1,7 @@
module.exports = `
select
TABLE_NAME as pureName,
TABLE_ROWS as tableRowCount,
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
from information_schema.tables
where TABLE_SCHEMA = '#DATABASE#' and TABLE_TYPE='BASE TABLE' and TABLE_NAME =OBJECT_ID_CONDITION;