Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #113 from beterthanlife/master

Update CassandraType
  • Loading branch information...
commit b5d503267e8c87061cf691ffec80974b9b1be166 2 parents 343dd5f + 7795fd2
@nberardi nberardi authored
Showing with 18 additions and 1 deletion.
  1. +18 −1 src/Types/CassandraType.cs
View
19 src/Types/CassandraType.cs
@@ -131,7 +131,24 @@ private void ParseCompositeType(string part)
_compositeTypes = new List<CassandraType>();
foreach (var p in parts)
- _compositeTypes.Add(Parse(p));
+ {
+ int reversedStart = p.IndexOf('(');
+
+ // check for reversed type
+ if (reversedStart == -1)
+ {
+ _compositeTypes.Add(Parse(p));
+ }
+ else
+ {
+ var part1 = p.Substring(0, reversedStart);
+
+ if (Parse(part1) == typeof(ReversedType))
+ _compositeTypes.Add(new CassandraType(p));
+ else
+ throw new CassandraException("Type '" + part1 + "' not found.");
+ }
+ }
}
private void ParseDynamicCompositeType(string part)
Please sign in to comment.
Something went wrong with that request. Please try again.