프로젝트

일반

사용자정보

개정판 2ec7438d

ID2ec7438df15c05149f75abd5e3c1fe26c73fd748
상위 69b0441c
하위 3c69a1da

함의성이(가) 약 3년 전에 추가함

fix appdocdata

Change-Id: Id32dc00af79db6dd27972eca10f6dfad72744e65

차이점 보기:

DTI_PID/DTI_PID/AppDocData.py
1142 1142
        conn = self.project.database.connect()
1143 1143
        with conn:
1144 1144
            try:
1145
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
1145
                cursor = conn.cursor()
1146 1146
                sql = "select UID,Name,Type1,Conditions1,Type2,Conditions2 from LineTypes order by Name"
1147 1147
                cursor.execute(sql)
1148 1148
                rows = cursor.fetchall()
......
3016 3016
        with self.project.database.connect() as conn:
3017 3017
            try:
3018 3018
                # Get a cursor object
3019
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3019
                cursor = conn.cursor()
3020 3020

  
3021 3021
                sql = "select a.*,b.Name,b.SymbolType_UID,b.[Type],b.OriginalPoint,b.ConnectionPoint,b.BaseSymbol," \
3022 3022
                      "b.AdditionalSymbol,b.HasInstrumentLabel,b.Flip as DetectFlip from Components a " \
......
3038 3038
        with self.project.database.connect() as conn:
3039 3039
            try:
3040 3040
                # Get a cursor object
3041
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3041
                cursor = conn.cursor()
3042 3042

  
3043 3043
                if target == "ALL" or target == '':
3044 3044
                    sql = "select (select Name from Drawings where UID=a.Drawings_UID) as Drawing," \
......
3071 3071
        with conn:
3072 3072
            try:
3073 3073
                # Get a cursor object
3074
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3074
                cursor = conn.cursor()
3075 3075

  
3076 3076
                sql = "select (select Name from Drawings where UID=a.From_Drawings_UID) as From_Drawing,\
3077 3077
                a.From_LineNo_UID as From_LineNo,\
......
3129 3129
        with conn:
3130 3130
            try:
3131 3131
                # Get a cursor object
3132
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3132
                cursor = conn.cursor()
3133 3133

  
3134 3134
                sql = f"select a.* from Points a join Components b on a.Components_UID=b.[UID] where Drawings_UID=" \
3135 3135
                      f"'{self.activeDrawing.UID}' order by Components_UID, [Index]"
......
3170 3170
        with conn:
3171 3171
            try:
3172 3172
                # Get a cursor object
3173
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3173
                cursor = conn.cursor()
3174 3174

  
3175 3175
                # sql = "select * from Associations where Components_UID='{}'".format(component)
3176 3176
                sql = "select a.* from Associations a \
......
3213 3213
        with conn:
3214 3214
            try:
3215 3215
                # Get a cursor object
3216
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3216
                cursor = conn.cursor()
3217 3217

  
3218 3218
                sql = "select a.*, b.* from Attributes a \
3219 3219
                            join SymbolAttribute b on a.SymbolAttribute_UID=b.UID \
......
3251 3251
        with conn:
3252 3252
            try:
3253 3253
                # Get a cursor object
3254
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3254
                cursor = conn.cursor()
3255 3255

  
3256 3256
                sql = "select * from PipeRuns where Owner='{}' order by [Index]".format(component)
3257 3257
                cursor.execute(sql)
......
3269 3269
        with conn:
3270 3270
            try:
3271 3271
                # Get a cursor object
3272
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3272
                cursor = conn.cursor()
3273 3273

  
3274 3274
                sql = "select * from PipeRunItems where PipeRuns_UID='{}' order by [Index]".format(pipe_run)
3275 3275
                cursor.execute(sql)
......
3291 3291
        with conn:
3292 3292
            try:
3293 3293
                # Get a cursor object
3294
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3294
                cursor = conn.cursor()
3295 3295

  
3296 3296
                sql = 'select UID, Code, Type, Allowables from SpecialItemTypes order by Code DESC'
3297 3297
                cursor.execute(sql)
......
3832 3832
        with conn:
3833 3833
            try:
3834 3834
                # Get a cursor object
3835
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3835
                cursor = conn.cursor()
3836 3836

  
3837 3837
                sql = "select a.UID,D.Name,E.Name as 'Drawing Name',C.Attribute,B.Value from Components a " \
3838 3838
                      "join Attributes B on a.UID=B.Components_UID " \
......
3909 3909
        with conn:
3910 3910
            try:
3911 3911
                # Get a cursor object
3912
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3912
                cursor = conn.cursor()
3913 3913

  
3914 3914
                sql = "select a.UID,D.Name,E.Name as 'Drawing Name',C.Attribute,B.Value,a.Symbol_UID from Components a " \
3915 3915
                      "join Attributes B on a.UID=B.Components_UID " \
......
3982 3982
        with conn:
3983 3983
            try:
3984 3984
                # Get a cursor object
3985
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
3985
                cursor = conn.cursor()
3986 3986

  
3987 3987
                sql = "select a.UID,D.Name,E.Name as 'Drawing Name',C.Attribute,B.Value from Components a " \
3988 3988
                      "join Attributes B on a.UID=B.Components_UID " \
......
4237 4237

  
4238 4238
        with self.project.database.connect() as conn:
4239 4239
            try:
4240
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
4240
                cursor = conn.cursor()
4241 4241
                if self.project.database.db_type == 'SQLite':
4242 4242
                    sql = 'select UID, [NAME], [DATETIME], IFNULL(B.[X], 0) as X, IFNULL(B.[Y], 0) as Y, ' \
4243 4243
                          'IFNULL(B.[Width], 0) as Width, IFNULL(B.[Height], 0) as Height from Drawings A ' \
......
4268 4268
        with self.project.database.connect() as conn:
4269 4269
            try:
4270 4270
                # Get a cursor object
4271
                cursor = conn.cursor() if self.project.database.db_type == 'SQLite' else conn.cursor(as_dict=True)
4271
                cursor = conn.cursor()
4272 4272
                if self.project.database.db_type == 'SQLite':
4273 4273
                    cursor.execute('begin')
4274 4274

  

내보내기 Unified diff

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