Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Unified Diff: third_party/gsutil/third_party/boto/boto/dynamodb2/types.py

Issue 1377933002: [catapult] - Copy Telemetry's gsutilz over to third_party. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: Rename to gsutil. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/gsutil/third_party/boto/boto/dynamodb2/types.py
diff --git a/third_party/gsutil/third_party/boto/boto/dynamodb2/types.py b/third_party/gsutil/third_party/boto/boto/dynamodb2/types.py
new file mode 100644
index 0000000000000000000000000000000000000000..1216621ac5b9f1ba69628e6f57d13d191e06437e
--- /dev/null
+++ b/third_party/gsutil/third_party/boto/boto/dynamodb2/types.py
@@ -0,0 +1,44 @@
+# Shadow the DynamoDB v1 bits.
+# This way, no end user should have to cross-import between versions & we
+# reserve the namespace to extend v2 if it's ever needed.
+from boto.dynamodb.types import NonBooleanDynamizer, Dynamizer
+
+
+# Some constants for our use.
+STRING = 'S'
+NUMBER = 'N'
+BINARY = 'B'
+STRING_SET = 'SS'
+NUMBER_SET = 'NS'
+BINARY_SET = 'BS'
+NULL = 'NULL'
+BOOLEAN = 'BOOL'
+MAP = 'M'
+LIST = 'L'
+
+QUERY_OPERATORS = {
+ 'eq': 'EQ',
+ 'lte': 'LE',
+ 'lt': 'LT',
+ 'gte': 'GE',
+ 'gt': 'GT',
+ 'beginswith': 'BEGINS_WITH',
+ 'between': 'BETWEEN',
+}
+
+FILTER_OPERATORS = {
+ 'eq': 'EQ',
+ 'ne': 'NE',
+ 'lte': 'LE',
+ 'lt': 'LT',
+ 'gte': 'GE',
+ 'gt': 'GT',
+ # FIXME: Is this necessary? i.e. ``whatever__null=False``
+ 'nnull': 'NOT_NULL',
+ 'null': 'NULL',
+ 'contains': 'CONTAINS',
+ 'ncontains': 'NOT_CONTAINS',
+ 'beginswith': 'BEGINS_WITH',
+ 'in': 'IN',
+ 'between': 'BETWEEN',
+}
« no previous file with comments | « third_party/gsutil/third_party/boto/boto/dynamodb2/table.py ('k') | third_party/gsutil/third_party/boto/boto/ec2/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698