module sql.type_helpers
¶
Short summary¶
module pyensae.sql.type_helpers
helpers about python types
Functions¶
function |
truncated documentation |
---|---|
Guesses the type of a value. |
|
Documentation¶
helpers about python types
- pyensae.sql.type_helpers.get_default_value_type(ty, none=True)¶
- Parameters:
ty – type in guess_type_value_type
none – if True and all values are empty, return None
- Returns:
a default value for this type
- pyensae.sql.type_helpers.guess_type_value(x, none=None)¶
Guesses the type of a value.
- Parameters:
x – type
none – if True and all values are empty, return None
- Returns:
type
Warning
if an integer starts with a zero, then it is a string.
- pyensae.sql.type_helpers.guess_type_value_type(none=True)¶
- Parameters:
none – if True and all values are empty, return None
- Returns:
the list of types recognized by guess_type_value