~ubuntu-branches/ubuntu/utopic/mysql-workbench/utopic

« back to all changes in this revision

Viewing changes to plugins/wb.sqlide/sql_reformatter.py

  • Committer: Package Import Robot
  • Author(s): Dmitry Smirnov
  • Date: 2014-05-31 12:03:58 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140531120358-cjik5ofkmj0fxsn8
Tags: 6.1.6+dfsg-1
* New upstream release [May 2014].
* Dropped "prtcl.patch".
* "debian/clean": better clean-up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 
1
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
2
2
#
3
3
# This program is free software; you can redistribute it and/or
4
4
# modify it under the terms of the GNU General Public License as
16
16
# 02110-1301  USA
17
17
 
18
18
import string
19
 
import sys
20
19
import grt
21
 
import copy
22
20
 
23
21
INDENTATION = "    "
24
22
 
284
282
    
285
283
    def sym_variable_aux(self, node):
286
284
        return flatten_node_unspaced(node)
287
 
    
 
285
 
 
286
    def sym_select_var_ident(self, node):
 
287
        return flatten_node_unspaced(node)
 
288
 
288
289
    ### SELECT ###
289
290
    def sym_select_init(self, node):
290
291
        select = node_direct_child(node, 0)
521
522
                
522
523
                text += node_value(children[-1])
523
524
                return text
524
 
        except Exception, exc:
 
525
        except Exception:
525
526
            import traceback
526
527
            traceback.print_exc()
527
528
        
789
790
    elif statement[0] == "delete":
790
791
        return DeleteSQLPrettifier
791
792
    elif statement[0] == "create":
792
 
        create = statement[2][0]
 
793
        #unused create = statement[2][0]
793
794
        object = statement[2][1]
794
795
        if object[0] == "TABLE_SYM":
795
796
            return SQLPrettifier