Commit Graph

133 Commits

Author SHA1 Message Date
Mathias Stearn
244b162111 Use intrusive_ptr rather than shared_ptr for BSONObj
Advantages:
* Owned BSONObj now uses 1 heap allocation rather than 3
* sizeof(BSONObj) is now 16 rather than 24 (on 64 bit)
* perftest bson shows it to be much faster

Change in BSONObj constructor API for owned case to make sure old code gets
updated to allocate room for the ref count. Anyone using BSONObjBuilder doesn't
need to worry about this change.
2011-04-03 20:50:45 -04:00
Eliot Horowitz
00d67d07a9 some tests for getFieldDotted 2011-01-17 15:32:40 -05:00
Eliot Horowitz
b828d21630 ran astyle SERVER-2304 2011-01-04 00:40:41 -05:00
Eliot Horowitz
aed49ae715 fix case where the same element is in $each part of $addToSet SERVER-2249 2010-12-19 01:36:41 -05:00
Alberto Lerner
dce215638a BSON( min << MINKEY << max << MAXKEY) is handy 2010-11-23 11:28:49 -05:00
Alberto Lerner
b82faa5421 eliminate duplicate test cases, merge left-over? 2010-11-23 11:17:45 -05:00
Aaron
78044d147a SERVER-1917 don't allow returning new element with appendAs 2010-10-10 15:09:40 -07:00
Aaron
75351ec80f bsonobjbuilder change appendAs interface 2010-10-01 17:42:35 -07:00
Eliot Horowitz
0b975c9734 turn off test that is different on windows 2010-08-09 00:28:06 -04:00
Eliot Horowitz
9dd3b21002 make BSONElement::toString 20x faster for double 2010-08-08 23:39:09 -04:00
Eliot Horowitz
9c95e894ee use checksum to make curop threadsafe SERVER-723 2010-07-29 01:08:20 -04:00
Eliot Horowitz
d3d978a601 remove assert that isn't always valid 2010-07-26 17:03:14 -04:00
Eliot Horowitz
87d7c92d6b test 2010-07-26 16:25:23 -04:00
Alberto Lerner
1d83bd2e99 SERVER-1269 TODO 2010-07-22 21:19:59 -04:00
Eliot Horowitz
9bc4aea8ba operator < > <= >= for BSONObj 2010-07-20 23:16:48 -04:00
Alberto Lerner
0370c1858e Adjust test case 2010-07-19 19:06:41 -04:00
Mathias Stearn
8047e6afb2 $or helper in C++ SERVER-1332 2010-07-19 13:42:09 -04:00
Alberto Lerner
f51a4d0669 SERVER-1270 Hook StringData to BufBuilder 2010-07-19 09:56:24 -04:00
dwight
c3b07d52ce git???? 2010-07-18 15:04:01 -04:00
Alberto Lerner
16e0a0b656 SERVER-1270 StringData unit test 2010-07-14 18:15:18 -04:00
Mathias Stearn
1fd7718267 BSONForEach test 2010-07-14 14:47:16 -04:00
Mathias Stearn
23a6d6a869 Start handling Nuls in strings. SERVER-1177 2010-06-25 17:34:27 -04:00
Eliot Horowitz
a7f063dc21 nicer way to create bson
BSONField<int> x("x");
     BSONObj o = BSON( x(5) );
     ASSERT_EQUALS( BSON( "x" << 5 ) , o );

     o = BSON( x.gt(5) );
     ASSERT_EQUALS( BSON( "x" << BSON( "$gt" << 5 ) ) , o );
2010-06-21 11:18:33 -04:00
Eliot Horowitz
be7b84c033 close subobj BSONObjBuilders automatically if they don't get closed cleanly 2010-06-10 16:00:37 -04:00
dwight
23882959f5 switch default subtype to 0 for BinData bson 2010-06-09 11:00:43 -04:00
Dwight Merriman
a6e5b141c2 remove extraneous logging from dbtests 2010-05-25 21:53:55 -04:00
Eliot Horowitz
ead6f3dbd0 better assert debugging for win32 issue 2010-05-03 14:17:36 -04:00
Dwight
bd28578ab8 stdafx->pch 2010-04-27 15:27:52 -04:00
Eliot Horowitz
64c2ab5a06 can iterate over a BSONObjBuilder without commiting 2010-04-21 15:02:37 -04:00
Mathias Stearn
7e25fdb8e8 ObjectID from Date_t SERVER-857 2010-04-14 19:53:28 -04:00
Mathias Stearn
0cae84589e Convert OID to datetimes SERVER-857 2010-04-14 19:53:28 -04:00
Aaron
00f604c063 SERVER-489 toString() foramt arrays as arrays not objects 2010-04-05 23:48:09 -07:00
Eliot Horowitz
c91e3ba456 fix equality matching of emdeded docs with numbers SERVER-853 2010-03-31 12:27:10 -04:00
Mathias Stearn
0358eae899 Revert "BSONObj::appendAny for boost::any"
This reverts commit d6d9d114f1.

Conflicts:

	db/jsobj.h
2010-03-18 21:59:23 -04:00
Mathias Stearn
d6d9d114f1 BSONObj::appendAny for boost::any 2010-03-18 18:06:40 -04:00
Mathias Stearn
1e2bc390de Reduce liklihood of TimeTBuilder test fail SERVER-755 2010-03-15 19:18:01 -04:00
Eliot Horowitz
02d6682a83 String types are valid as long as last character is EOO SERVER-706 2010-03-06 16:55:26 -05:00
Eliot Horowitz
dc29dbbb7c appendNumber for nicer numbers in the shell 2010-03-01 17:14:23 -05:00
Eliot Horowitz
6ac50f8e9e fix BSONElementCmpWithoutField and therefore BSONElementSet 2010-02-27 21:53:28 -05:00
Mathias Stearn
a733d58f95 fix logic error in appendIntOrLL 2010-02-02 21:34:21 -05:00
Mathias Stearn
deb05df864 BSONObjBuilder::asTempObj() for peeking at state 2010-01-28 14:40:45 -05:00
Eliot Horowitz
81001819be better debugging for invalid objects 2010-01-26 10:03:30 -05:00
Eliot Horowitz
6830dd0dd0 BSONObj::okForStorage - just checks for $ and . for 2010-01-16 11:08:32 -05:00
Eliot Horowitz
0ab8149a8e uassert/massert take error code SERVER-112 2009-12-28 16:43:43 -05:00
Eliot Horowitz
a71ff07701 BSONObjIteratorSorted - sorted iterator for bson obj that is sorted by field name 2009-12-18 01:50:43 -05:00
Mathias Stearn
dcf3a10eea Start using Date_t. Can anyone think of a better name? 2009-12-09 12:00:17 -05:00
Eliot Horowitz
5946dbf445 32-bit fix 2009-11-13 21:19:38 -05:00
Eliot Horowitz
ca785a0400 BDONObjBuilder::apendAsNumber
better fix for SERVER-423
2009-11-13 21:07:15 -05:00
Mathias Stearn
44498641ea BSON_ARRAY macro 2009-11-05 13:34:14 -05:00
Mathias Stearn
e863bb68d6 BSONArray class 2009-11-05 13:34:14 -05:00