class_docstr: A Shillelagh adapter for Superset tables.
  
  Shillelagh adapters are responsible for fetching data from a given resource,
  allowing it to be represented as a virtual table in SQLite. This one works
  as a proxy to Superset tables.
class_docstr_tok: ["A","Shillelagh","adapter","for","Superset","tables",".","Shillelagh","adapters","are","responsible","for","fetching","data","from","a","given","resource",",","allowing","it","to","be","represented","as","a","virtual","table","in","SQLite",".","This","one","works","as","a","proxy","to","Superset","tables","."]
docstr: Insert a single row.
docstr_tok: ["Insert","a","single","row","."]
code: def insert_row(self, row: Row) -> int:
      """
      Insert a single row.
      """
      row_id: int | None = row.pop("rowid")
      if row_id and self._rowid:
          if row.get(self._rowid) != row_id:
              raise ProgrammingError(
                  f"Invalid rowid specified: {row_id}"
              )
          row[self._rowid] = row_id
  
      if (
          self._rowid
          and row[self._rowid] is None
          and self._table.c[self._rowid].autoincrement
      ):
          row.pop(self._rowid)
  
      query = self._table.insert().values(**row)
  
      with self.engine_context() as engine:
          connection = engine.connect()
          result = connection.execute(query)
  
          # return rowid
          if self._rowid:
              return result.inserted_primary_key[0]
  
          query = select([func.count()]).select_from(self._table)
          return connection.execute(query).scalar()
  
imports: from __future__ import annotations
  import datetime
  import decimal
  import operator
  import urllib.parse
  from collections.abc import Iterator
  from functools import partial, wraps
  from typing import Any, Callable, cast, TypeVar
  from flask import current_app
  from shillelagh.adapters.base import Adapter
  from shillelagh.backends.apsw.dialects.base import APSWDialect
  from shillelagh.exceptions import ProgrammingError
  from shillelagh.fields import Boolean, Date, DateTime, Field, Float, Integer, Order, String, Time
  from shillelagh.filters import Equal, Filter, Range
  from shillelagh.typing import RequestedOrder, Row
  from sqlalchemy import func, MetaData, Table
  from sqlalchemy.engine.url import URL
  from sqlalchemy.exc import NoSuchTableError
  from sqlalchemy.sql import Select, select
  from superset import db, feature_flag_manager, security_manager, sql_parse
label_desc: Use image node_id 9 for calling the SupersetShillelaghAdapter obj's underlying member method code with example usage: obj.insert_row(row) and returns: connection, result