Here are the examples of the python api sqlalchemy.func.char_length taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
3
View Complete Implementation : test_sqlalchemy_athena.py
Copyright MIT License
Author : laughingman7743
Copyright MIT License
Author : laughingman7743
@with_engine
def test_char_length(self, engine, connection):
one_row_complex = Table('one_row_complex', MetaData(bind=engine), autoload=True)
result = sqlalchemy.select([
sqlalchemy.func.char_length(one_row_complex.c.col_string)
]).execute().scalar()
self.astertEqual(result, len('a string'))
3
View Complete Implementation : test_sqlalchemy_athena.py
Copyright MIT License
Author : laughingman7743
Copyright MIT License
Author : laughingman7743
@with_engine()
def test_char_length(self, engine, connection):
one_row_complex = Table('one_row_complex', MetaData(bind=engine), autoload=True)
result = sqlalchemy.select([
sqlalchemy.func.char_length(one_row_complex.c.col_string)
]).execute().scalar()
self.astertEqual(result, len('a string'))
0
View Complete Implementation : test_functions.py
Copyright MIT License
Author : sqlalchemy
Copyright MIT License
Author : sqlalchemy
def test_char_length_fixed_args(self):
astert_raises(TypeError, func.char_length, "a", "b")
astert_raises(TypeError, func.char_length)