Skip to content

Commit

Permalink
using a list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Sep 29, 2015
1 parent fbb6dea commit 10df510
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions myql/myql.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,12 @@ def select(self, table, items=None, limit=None, offset=None, remote_filter=None,

return self

## MULTI QUERY
def multi_query(self, queries):
"""Allow multi query
"""
pass

## INSERT
def insert(self, table,items, values):
"""This method allows to insert data into table
Expand Down Expand Up @@ -315,10 +321,8 @@ def where(self, *args):

clause = []
self._query += ' WHERE '
for x in args:
if x:
x = self._clause_formatter(x)
clause.append(x)

clause = [ self._clause_formatter(x) for x in args if x ]

self._query += ' AND '.join(clause)

Expand Down

0 comments on commit 10df510

Please sign in to comment.