Skip to content

Commit 06fc387

Browse files
author
Daniel Kinzler
committed
auto_order optional
git-svn-id: https://svn.toolserver.org/svnroot/daniel/duesenstuff/trunk/gpClient@625 9f2c43bc-b3c0-43f4-b155-41619b16f219
1 parent 50efd4b commit 06fc387

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/gp/mediawiki.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def make_id_source ( self, ns = None ) :
256256
return self.make_source( ns, True )
257257

258258

259-
def make_source ( self, ns = None, ids_only = False ) :
259+
def make_source ( self, ns = None, ids_only = False, auto_order = False ) : #TODO: PORT auto_order to PHP
260260
t = self.table_id_obj if ids_only else self.table_obj
261261

262262
if ( ns is not None ) :
@@ -268,7 +268,7 @@ def make_source ( self, ns = None, ids_only = False ) :
268268
t = MySQLSelect(select)
269269

270270

271-
src = self.glue.make_source( t, self.big )
271+
src = self.glue.make_source( t, big = self.big, auto_order = auto_order )
272272
return src
273273

274274

python/gp/mysql.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,10 +660,10 @@ def make_sink (self, table ):
660660
return sink
661661

662662

663-
def make_source (self, table, big = False, **kwargs ):
663+
def make_source (self, table, big = False, auto_order = False, **kwargs ): #TODO: PORT auto_order to PHP
664664
sql = table._get_select()
665665

666-
if not re.search(r'\s+ORDER\s+BY\s+', sql, flags = re.IGNORECASE | re.DOTALL ) :
666+
if auto_order and not re.search(r'\s+ORDER\s+BY\s+', sql, flags = re.IGNORECASE | re.DOTALL ) : #TODO: PORT auto_order to PHP
667667
sql += ' ' + table.get_order_by()
668668

669669
if not 'unbuffered' in kwargs:

0 commit comments

Comments
 (0)