Esempio n. 1
0
 def _build_join(self, tables, where, on, order, columns, limit, offset):
     on = on or [None] * len(tables)
     return 'SELECT %s FROM %s ' % (sqlop.columns(columns), tables[0]) + \
            " ".join(['JOIN %s ON %s' % (tables[i], sqlop.on((tables[0], tables[i]), on[i - 1]))
                      for i in range(1, len(tables))]) + \
            sqlop.where(where) + sqlop.order(order) + sqlop.limit(limit) + sqlop.offset(offset)
Esempio n. 2
0
 def _build_select(self, table, where, order, columns, limit, offset, update):
     return 'SELECT %s FROM %s' % (sqlop.columns(columns), table) \
            + sqlop.where(where) + sqlop.order(order) + sqlop.limit(limit) \
            + sqlop.offset(offset) + sqlop.for_update(update)