Project

General

Profile

« Previous | Next » 

Revision 5332

sql_gen.py: ensure_not_null(): Just store the column type in col_type, instead of storing typed_col and using typed_col.type, now that other info in typed_col is no longer needed

View differences:

sql_gen.py
1064 1064
    @throws ensure_not_null_excs
1065 1065
    '''
1066 1066
    col = remove_col_rename(col)
1067
    try: typed_col = db.col_info(underlying_col(col))
1067
    
1068
    try: col_type = db.col_info(underlying_col(col)).type
1068 1069
    except NoUnderlyingTableException:
1069 1070
        if type_ == None and is_null(col): raise
1070 1071
    else:
1071
        if type_ == None: type_ = typed_col.type
1072
        elif type_ != typed_col.type: col = Cast(type_, col)
1072
        if type_ == None: type_ = col_type
1073
        elif type_ != col_type: col = Cast(type_, col)
1073 1074
    
1074 1075
    if is_nullable(db, col):
1075 1076
        try: col = EnsureNotNull(col, type_)

Also available in: Unified diff