Skip to content

Commit

Permalink
[MariaDB] discover SYSTEM VERSIONED tables (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 authored Jul 17, 2022
1 parent 78cf272 commit 1b800b3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mysql/query/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ pub enum TableType {
View,
#[iden = "SYSTEM VIEW"]
SystemView,
#[iden = "SYSTEM VERSIONED"]
SystemVersioned,
}

#[derive(Debug, Default)]
Expand Down Expand Up @@ -74,7 +76,10 @@ impl SchemaQueryBuilder {
.equals(Schema::Tables, TablesFields::TableCollation),
)
.and_where(Expr::col(TablesFields::TableSchema).eq(schema.to_string()))
.and_where(Expr::col(TablesFields::TableType).eq(TableType::BaseTable.to_string()))
.and_where(Expr::col(TablesFields::TableType).is_in([
TableType::BaseTable.to_string(),
TableType::SystemVersioned.to_string(),
]))
.order_by(TablesFields::TableName, Order::Asc)
.take()
}
Expand Down

0 comments on commit 1b800b3

Please sign in to comment.