class_docstr: SqlColumnType has issues with serialization, so using this union-style type.
class_docstr_tok: ["SqlColumnType","has","issues","with","serialization",",","so","using","this","union-style","type","."]
docstr: Convenience method for creating these values. Frowning on the use of isinstance().
docstr_tok: ["Convenience","method","for","creating","these","values",".","Frowning","on","the","use","of","isinstance","(",")","."]
code: def create_from_sql_column_type(
      value: SqlColumnType,
  ) -> SqlBindParameterValue:
      """Convenience method for creating these values. Frowning on the use of isinstance()."""
      if isinstance(value, str):
          return SqlBindParameterValue(str_value=value)
      elif isinstance(value, int):
          return SqlBindParameterValue(int_value=value)
      elif isinstance(value, float):
          return SqlBindParameterValue(float_value=value)
      elif isinstance(value, datetime.datetime):
          return SqlBindParameterValue(datetime_value=value)
      elif isinstance(value, datetime.date):
          return SqlBindParameterValue(date_value=value)
      elif isinstance(value, bool):
          return SqlBindParameterValue(bool_value=value)
  
      raise RuntimeError(f"Unhandled type: {type(value)}")
  
imports: from __future__ import annotations
  import datetime
  from collections import OrderedDict
  from dataclasses import dataclass
  from typing import Any, Mapping, Optional, Tuple
  from dbt_semantic_interfaces.dataclass_serialization import SerializableDataclass
  from metricflow.assert_one_arg import assert_exactly_one_arg_set
  from metricflow.sql.sql_column_type import SqlColumnType
label_desc: Use image node_id 3 for calling the SqlBindParameterValue obj's underlying member method code with example usage: obj.create_from_sql_column_type(value) and returns: SqlBindParameterValue, SqlBindParameterValue, SqlBindParameterValue, SqlBindParameterValue, SqlBindParameterValue, SqlBindParameterValue