프로젝트

일반

사용자정보

개정판 7b1cbd9c

ID7b1cbd9c4ff780caacfb7fdf34f1235b02e3057c
상위 9935088f
하위 80507bf9

함의성이(가) 일년 이상 전에 추가함

db clear

Change-Id: I3e15f3659838a96a4286374e5c729d56ffeeaf9b

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
4203 4203
                    cursor.execute(sql)
4204 4204
                    sql = "delete from Stream_Line_List where Drawing_UID='{}'".format(drawing.UID)
4205 4205
                    cursor.execute(sql)
4206
                    sql = "delete from Views where Drawings_UID='{}'".format(drawing.UID)
4206
                    sql = "delete from [Views] where Drawings_UID='{}'".format(drawing.UID)
4207 4207
                    cursor.execute(sql)
4208 4208
                    sql = "delete from Drawings where [UID]='{}'".format(drawing.UID)
4209 4209
                    cursor.execute(sql)
4210 4210

  
4211
                    if self.project.database.db_type == 'SQLite':
4212
                        cursor.execute('commit')
4213
                    else:
4214
                        conn.commit()
4211
                    # multi table delete not support in mssql
4212
                    ''' 
4213
                    sql = f"delete LINE_DATA_LIST, TitleBlockValues, LineNoAttributes, Attributes, Associations, Points, PipeRunItems, PipeRuns, Components, Stream_Line_List, [Views], Drawings " \
4214
                            f"from LINE_DATA_LIST a " \
4215
                            f"join TitleBlockValues b on a.PNID_NO = b.Drawings_UID " \
4216
                            f"join LineNoAttributes c on b.Drawings_UID = c.Drawings_UID " \
4217
                            f"join Attributes d on c.Drawings_UID = d.Drawings_UID " \
4218
                            f"join Associations e on d.Drawings_UID = e.Drawings_UID " \
4219
                            f"join Points f on e.Drawings_UID = f.Drawings_UID " \
4220
                            f"join PipeRunItems g on f.Drawings_UID = g.Drawings_UID " \
4221
                            f"join PipeRuns h on g.Drawings_UID = h.Drawings_UID " \
4222
                            f"join Components i on h.Drawings_UID = i.Drawings_UID " \
4223
                            f"join Stream_Line_List j on i.Drawings_UID = j.Drawing_UID " \
4224
                            f"join [Views] k on j.Drawing_UID = k.Drawings_UID " \
4225
                            f"join Drawings l on k.Drawings_UID = l.[UID] " \
4226
                            f"where l.[uid] = '{drawing.UID}'"
4227
                    cursor.execute(sql)
4228
                    '''
4229

  
4230
                if self.project.database.db_type == 'SQLite':
4231
                    cursor.execute('commit')
4232
                else:
4233
                    conn.commit()
4215 4234

  
4216 4235
                # Catch the exception
4217 4236
            except Exception as ex:

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)