Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
bealdav committed Oct 29, 2024
1 parent 815888b commit 8170a1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions polars_db_schema/models/db_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ class DbConfig(models.Model):

def get_db_metadata(self):
self.ensure_one()
connexion = self._get_connexion()
if self.row_count_query:
self._read_sql(connexion, "SELECT 1")
df = self._read_sql(connexion, self.row_count_query)
self._read_sql("SELECT 1")
df = self._read_sql(self.row_count_query)
if self.db_type_id.code == "sqlite":
# https://docs.pola.rs/user-guide/expressions/user-defined-functions/#processing-individual-values-with-map_elements
df = (
Expand Down
2 changes: 1 addition & 1 deletion polars_db_schema/views/db_type.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</field>
</record>

<record id="dataframe_type_list" model="ir.ui.view">
<record id="db_type_list" model="ir.ui.view">
<field name="model">db.type</field>
<field name="arch" type="xml">
<list>
Expand Down

0 comments on commit 8170a1c

Please sign in to comment.