module sql.type_helpers

Short summary

module pyensae.sql.type_helpers

helpers about python types

source on GitHub

Functions

function

truncated documentation

get_default_value_type

guess_type_value

Guesses the type of a value.

guess_type_value_type

Documentation

helpers about python types

source on GitHub

pyensae.sql.type_helpers.get_default_value_type(ty, none=True)[source]
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

source on GitHub

pyensae.sql.type_helpers.guess_type_value(x, none=None)[source]

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.

source on GitHub

pyensae.sql.type_helpers.guess_type_value_type(none=True)[source]
Parameters

none – if True and all values are empty, return None

Returns

the list of types recognized by guess_type_value

source on GitHub