New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grex

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grex - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

4

CHANGES.md

@@ -5,2 +5,6 @@ ## TODO (upcoming releases)

- Test CUD
## 0.2.1
- Fixed bug on createVertex transaction
- added T.in and T.notin

@@ -7,0 +11,0 @@ ## 0.2.0

15

examples/createVertex.js

@@ -5,9 +5,14 @@ var grex = require('../src/grex.js');

grex.connect().then(function(g){
grex.connect({
'host': 'localhost',
'port': 8182,
'graph': 'orientdbsample',
'idRegex': /^[0-9]+:[0-9]+$/
}).then(function(g){
trxn = g.begin();
trxn = g.begin({name:'string',age:'integer', weight:'float'});
t1 = trxn.addVertex(111,{name:'Test1a'});
t2 = trxn.addVertex(222,{name:'Test2a'});
trxn.addEdge(111, 222, 'linked', {name:"ALabel"})
t1 = trxn.addVertex({name:'Test1a', age:20});
t2 = trxn.addVertex({name:'Test2a', age:'30'});
trxn.addEdge(t1, t2, 'linked', {name:"ALabel", weight:1.2})

@@ -14,0 +19,0 @@ // t1 = trxn.addVertex({name:'Test1b'});

module.exports = function(grunt){
//Need to work out how to include browserify & uglify
//browserify -r ./src/grex.js:grex > ./browser/bundle.js
//uglifyjs ./browser/bundle.js -o ./browser/grex.min.js
// Project configuration.

@@ -3,0 +8,0 @@ grunt.initConfig({

{
"name": "grex",
"description": "Client for Rexster Graph Server",
"version": "0.2.0",
"version": "0.2.1",
"keywords": [

@@ -6,0 +6,0 @@ "database",

@@ -13,3 +13,3 @@ ;(function(global) {

var newVertex = '/vertices';
var graphRegex = /^T\.(gt|gte|eq|neq|lte|lt|decr|incr|notin)$|^Contains\.(IN|NOT_IN)$|^g\.|^Vertex(?=\.class\b)|^Edge(?=\.class\b)/;
var graphRegex = /^T\.(gt|gte|eq|neq|lte|lt|decr|incr|notin|in)$|^Contains\.(IN|NOT_IN)$|^g\.|^Vertex(?=\.class\b)|^Edge(?=\.class\b)/;
var closureRegex = /^\{.*\}$/;

@@ -79,3 +79,3 @@

var self = this,
gremlin = reset ? new Gremlin(this/*.OPTS*/) : self._buildGremlin(self.params),
gremlin = reset ? new Gremlin(this) : self._buildGremlin(self.params),
args = '',

@@ -107,2 +107,5 @@ appendArg = '';

function parseArgs(val) {
if(val === null) {
return 'null';
}
//check to see if the arg is referencing the graph ie. g.v(1)

@@ -258,6 +261,5 @@ if(isObject(val) && val.hasOwnProperty('params') && isGraphReference(val.params)){

};
//tempStr += '(' + typeHash[typeDef[idx]] + ',' + obj[k] + '),';
} else {
if (k in typeDef) {
tempStr += /*','+*/ k + '=(' + typeHash[typeDef[k]] + ',' + obj[k] + ')';
tempStr += k + '=(' + typeHash[typeDef[k]] + ',' + obj[k] + ')';
tempStr = tempStr.replace(')(', '),(');

@@ -312,3 +314,3 @@ } else {

o = arguments[0];
push.call(this.newVertices, addTypes(o, this.typeMap));
push.call(this.newVertices, o);
addToTransaction = false;

@@ -325,3 +327,3 @@ } else {

} else if (type == 'vertex') {
push.call(this.newVertices, addTypes(o, this.typeMap));
push.call(this.newVertices, o);
addToTransaction = false;

@@ -334,2 +336,3 @@ }

};
return o;
}

@@ -390,3 +393,3 @@ }

for (var i = 0; i < newVerticesLen; i++) {
promises.push(postData.call(self, newVertex, self.newVertices[i]));
promises.push(postData.call(self, newVertex, addTypes(self.newVertices[i], self.typeMap),{'Content-Type':'application/vnd.rexster-typed-v1+json'}));
};

@@ -400,3 +403,7 @@ return q.all(promises).then(function(result){

if('results' in result[j] && '_id' in result[j].results){
self.newVertices[j]._id = result[j].results._id;
for(var prop in result[j].results){
if(result[j].results.hasOwnProperty(prop)){
self.newVertices[j][prop] = result[j].results[prop];
}
}
} else {

@@ -446,3 +453,3 @@ inError = true;

function postData(urlPath, data){
function postData(urlPath, data, headers){
var self = this;

@@ -462,2 +469,10 @@ var deferred = q.defer();

};
if(headers){
for(var prop in headers){
if(headers.hasOwnProperty(prop)){
options.headers[prop] = headers[prop];
}
}
}
options.path += urlPath;

@@ -643,3 +658,3 @@

for(var k in tempObj){
if (tempObj.hasOwnProperty) {
if (tempObj.hasOwnProperty(k)) {
if (isObject(tempObj[k]) && 'type' in tempObj[k]) {

@@ -863,2 +878,2 @@ if(!!typeMap[k] && typeMap[k] != tempObj[k].type){

})(this);
})(this);

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc