[CSHARP-563] Add indexing to BsonValue Created: 09/Sep/12 Updated: 20/Mar/14 Resolved: 01/Dec/12 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 1.6 |
| Fix Version/s: | 1.8 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Robert Stam |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Define indexing at the BsonValue level so that indexing is available automatically without having to downcast the BsonValue to a BsonDocument or BsonArray. If indexing is invoked on a BsonValue that is not a document or array an InvalidOperationException will be thrown. This allows code to be written much more concisely. For example:
can now be written simply as:
NOTE: this new feature is not really compatible with the proposal in |
| Comments |
| Comment by auto [ 01/Dec/12 ] |
|
Author: {u'date': u'2012-09-09T03:58:38Z', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by auto [ 01/Dec/12 ] |
|
Author: {u'date': u'2012-09-09T03:48:29Z', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by auto [ 01/Dec/12 ] |
|
Author: {u'date': u'2012-09-09T01:15:48Z', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: Conflicts: |
| Comment by Robert Stam [ 29/Nov/12 ] |
|
Reopened to backport feature to 1.8. |
| Comment by Robert Stam [ 10/Sep/12 ] |
|
Pushed to x2.0. |
| Comment by auto [ 10/Sep/12 ] |
|
Author: {u'date': u'2012-09-08T20:58:38-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by auto [ 10/Sep/12 ] |
|
Author: {u'date': u'2012-09-08T20:48:29-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by auto [ 10/Sep/12 ] |
|
Author: {u'date': u'2012-09-08T18:15:48-07:00', u'email': u'robert@10gen.com', u'name': u'rstam'}Message: |
| Comment by Robert Stam [ 09/Sep/12 ] |
|
In code review again. |
| Comment by Robert Stam [ 09/Sep/12 ] |
|
The exception thrown when indexing is used on a BsonValue that doesn't support it should be a NotSupportedException, not an InvalidOperationException. |
| Comment by Robert Stam [ 09/Sep/12 ] |
|
In code review. |