summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-10-02 16:38:20 -0400
committerEliot Horowitz <eliot@10gen.com>2009-10-02 16:38:20 -0400
commiteaf0c845bccc01d61b7971b8c3b507fc7a175d38 (patch)
tree563bd9002d0ed758f71879227ee7ad015cec54f9 /scripting
parent5db7ed9d3e51615e1a5dac2725e7fd6f802453f2 (diff)
downloadmongo-eaf0c845bccc01d61b7971b8c3b507fc7a175d38.tar.gz
renamed DBRef DBPointer SERVER-243
Diffstat (limited to 'scripting')
-rw-r--r--scripting/engine_spidermonkey.cpp2
-rw-r--r--scripting/engine_spidermonkey.h2
-rw-r--r--scripting/sm_db.cpp18
3 files changed, 11 insertions, 11 deletions
diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp
index 88a410544a1..0cfcc20ae0f 100644
--- a/scripting/engine_spidermonkey.cpp
+++ b/scripting/engine_spidermonkey.cpp
@@ -526,7 +526,7 @@ namespace mongo {
}
case DBRef: {
- JSObject * o = JS_NewObject( _context , &dbref_class , 0 , 0 );
+ JSObject * o = JS_NewObject( _context , &dbpointer_class , 0 , 0 );
setProperty( o , "ns" , toval( e.dbrefNS() ) );
JSObject * oid = JS_NewObject( _context , &object_id_class , 0 , 0 );
diff --git a/scripting/engine_spidermonkey.h b/scripting/engine_spidermonkey.h
index c7d17aa999d..4b8f70acb28 100644
--- a/scripting/engine_spidermonkey.h
+++ b/scripting/engine_spidermonkey.h
@@ -73,7 +73,7 @@ namespace mongo {
extern JSClass bson_ro_class;
extern JSClass object_id_class;
- extern JSClass dbref_class;
+ extern JSClass dbpointer_class;
extern JSClass bindata_class;
extern JSClass timestamp_class;
extern JSClass minkey_class;
diff --git a/scripting/sm_db.cpp b/scripting/sm_db.cpp
index a9b3dc89862..4ed577eb6cf 100644
--- a/scripting/sm_db.cpp
+++ b/scripting/sm_db.cpp
@@ -480,15 +480,15 @@ namespace mongo {
{ 0 }
};
- // dbref
+ // dbpointer
- JSBool dbref_constructor( JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval ){
+ JSBool dbpointer_constructor( JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval ){
Convertor c( cx );
if ( argc == 2 ){
if ( ! JSVAL_IS_OID( argv[1] ) ){
- JS_ReportError( cx , "2nd arg to DBRef needs to be oid" );
+ JS_ReportError( cx , "2nd arg to DBPointer needs to be oid" );
return JS_FALSE;
}
@@ -497,19 +497,19 @@ namespace mongo {
return JS_TRUE;
}
else {
- JS_ReportError( cx , "DBRef needs 2 arguments" );
+ JS_ReportError( cx , "DBPointer needs 2 arguments" );
return JS_FALSE;
}
}
- JSClass dbref_class = {
- "DBRef" , JSCLASS_HAS_PRIVATE ,
+ JSClass dbpointer_class = {
+ "DBPointer" , JSCLASS_HAS_PRIVATE ,
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub , JS_ConvertStub, JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
- JSFunctionSpec dbref_functions[] = {
+ JSFunctionSpec dbpointer_functions[] = {
{ 0 }
};
@@ -670,7 +670,7 @@ namespace mongo {
assert( JS_InitClass( cx , global , 0 , &db_collection_class , db_collection_constructor , 4 , 0 , 0 , 0 , 0 ) );
assert( JS_InitClass( cx , global , 0 , &internal_cursor_class , internal_cursor_constructor , 0 , 0 , internal_cursor_functions , 0 , 0 ) );
assert( JS_InitClass( cx , global , 0 , &dbquery_class , dbquery_constructor , 0 , 0 , 0 , 0 , 0 ) );
- assert( JS_InitClass( cx , global , 0 , &dbref_class , dbref_constructor , 0 , 0 , dbref_functions , 0 , 0 ) );
+ assert( JS_InitClass( cx , global , 0 , &dbpointer_class , dbpointer_constructor , 0 , 0 , dbpointer_functions , 0 , 0 ) );
assert( JS_InitClass( cx , global , 0 , &bindata_class , bindata_constructor , 0 , 0 , bindata_functions , 0 , 0 ) );
assert( JS_InitClass( cx , global , 0 , &timestamp_class , 0 , 0 , 0 , 0 , 0 , 0 ) );
@@ -706,7 +706,7 @@ namespace mongo {
return true;
}
- if ( JS_InstanceOf( c->_context , o , &dbref_class , 0 ) ){
+ if ( JS_InstanceOf( c->_context , o , &dbpointer_class , 0 ) ){
b.appendDBRef( name.c_str() , c->getString( o , "ns" ).c_str() , c->toOID( c->getProperty( o , "id" ) ) );
return true;
}