27 #include "../../../../dataaccess/dataset/PrimaryKey.h" 28 #include "../../common/Utils.h" 32 #include <boost/cstdint.hpp> 36 return ::v8::Undefined();
41 return ::v8::Undefined();
46 return ::v8::Undefined();
51 return ::v8::Undefined();
56 return ::v8::Undefined();
61 return ::v8::Undefined();
66 return ::v8::Undefined();
71 return ::v8::Undefined();
78 if(args.Holder().IsEmpty())
79 return ::v8::ThrowException(::v8::String::New(
"In order to use the clone method, you must use the object notation: \"pk = obj.clone();\""));
84 return ::v8::ThrowException(::v8::String::New(
"Invalid primary key in the clone method!"));
90 return hs.Close(jpkclone);
114 return ::v8::Undefined();
121 global->Set(::v8::String::New(
"TePrimaryKey"), jpk->GetFunction());
131 ::v8::Local<::v8::FunctionTemplate> result = ::v8::FunctionTemplate::New();
132 result->Inherit(cTpl);
134 ::v8::Handle<::v8::ObjectTemplate> prototype = result->PrototypeTemplate();
138 prototype->Set(::v8::String::NewSymbol(
"add"), ::v8::FunctionTemplate::New(
PrimaryKey_Add));
141 prototype->Set(::v8::String::NewSymbol(
"has"), ::v8::FunctionTemplate::New(
PrimaryKey_Has));
142 prototype->Set(::v8::String::NewSymbol(
"replace"), ::v8::FunctionTemplate::New(
PrimaryKey_Replace));
143 prototype->Set(::v8::String::NewSymbol(
"getType"), ::v8::FunctionTemplate::New(
PrimaryKey_GetType));
144 prototype->Set(::v8::String::NewSymbol(
"clone"), ::v8::FunctionTemplate::New(
PrimaryKey_Clone));
::v8::Local<::v8::Object > Make(T *obj, TF tfunc, const bool isOwner)
It creates a new JavaScript object from a C++ object (obj).
void RegisterPrimaryKey(::v8::Local<::v8::Object > &global)
It registers the PrimaryKey class.
::v8::Handle<::v8::Value > PrimaryKey_GetType(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > PrimaryKey_Constructor(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > PrimaryKey_GetAssociatedIndex(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > PrimaryKey_Add(const ::v8::Arguments &args)
::v8::Persistent<::v8::FunctionTemplate > & GetPrimaryKeyTemplate()
It returns a reference to the persistent template of a PrimaryKey object.
JavaScript exporting routine for the TerraLib Data Access module.
::v8::Handle<::v8::Value > PrimaryKey_SetAssociatedIndex(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > PrimaryKey_Clone(const ::v8::Arguments &args)
static::v8::Persistent<::v8::FunctionTemplate > sdset_primarykey_template
::v8::Handle<::v8::Value > PrimaryKey_GetProperties(const ::v8::Arguments &args)
::v8::Handle<::v8::Value > PrimaryKey_Replace(const ::v8::Arguments &args)
Constraint * clone()
It returns a clone of the object.
::v8::Handle<::v8::Value > PrimaryKey_SetProperties(const ::v8::Arguments &args)
It describes a primary key (pk) constraint.
::v8::Handle<::v8::Value > PrimaryKey_Has(const ::v8::Arguments &args)
::v8::Persistent<::v8::FunctionTemplate > & GetConstraintTemplate()
It returns a reference to the persistent template of a Constraint object.