code style, name method

This commit is contained in:
Alexander Leibzon
2016-03-23 11:44:57 +02:00
parent ad95a5eb5e
commit 7bb80e375a
3 changed files with 8 additions and 4 deletions

View File

@@ -74,7 +74,11 @@ class DynamoDBSQL(BaseSQLQueryRunner):
@classmethod
def type(cls):
return "ddb_sql"
return "dynamodb_sql"
@classmethod
def name(cls):
return "DynamoDB (with DQL)"
def __init__(self, configuration):
super(DynamoDBSQL, self).__init__(configuration)
@@ -99,11 +103,11 @@ class DynamoDBSQL(BaseSQLQueryRunner):
engine = FragmentEngine()
connection = engine.connect(**self.configuration.to_dict())
resDict = engine.execute(query if str(query).endswith(';') else str(query)+';')
res_dict = engine.execute(query if str(query).endswith(';') else str(query)+';')
columns = []
rows = []
for item in resDict:
for item in res_dict:
if not columns:
for k, v in item.iteritems():

View File

@@ -19,7 +19,6 @@ python-dateutil==2.4.2
pytz==2015.7
redis==2.7.5
requests==2.3.0
botocore==1.4.4
six==1.10.0
sqlparse==0.1.8
wsgiref==0.1.2

View File

@@ -12,3 +12,4 @@ td-client==0.4.1
pymssql==2.1.1
dql==0.5.16
dynamo3==0.4.7
botocore==1.4.4