Project

General

Profile

« Previous | Next » 

Revision 10139

lib/sql.py: added col_default_value(), col_is_constant(), which interface with corresponding util-schema functions

View differences:

lib/sql.py
1294 1294
            , cacheable=True, log_level=4))
1295 1295
    except DoesNotExistException: return False
1296 1296

  
1297
#### Columns
1298

  
1299
def col_default_value(db, col):
1300
    assert isinstance(col, sql_gen.Col)
1301
    return value(run_query(db,
1302
        'SELECT util.col_default_value('+sql_gen.col2col_ref(db, col)+')'))
1303

  
1304
def col_is_constant(db, col):
1305
    assert isinstance(col, sql_gen.Col)
1306
    return value(run_query(db,
1307
        'SELECT util.is_constant('+sql_gen.col2col_ref(db, col)+')'))
1308

  
1297 1309
#### Functions
1298 1310

  
1299 1311
def function_exists(db, function):

Also available in: Unified diff