-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: SQL INSERT and CREATE VERTEX statements, support for json array
Fixed issue #1257
- Loading branch information
Showing
11 changed files
with
3,851 additions
and
3,544 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
engine/src/main/java/com/arcadedb/query/sql/parser/JsonArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* Generated By:JJTree: Do not edit this line. JsonArray.java Version 7.0 */ | ||
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=false,VISITOR=false,TRACK_TOKENS=true,NODE_PREFIX=,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */ | ||
package com.arcadedb.query.sql.parser; | ||
|
||
import java.util.*; | ||
import java.util.stream.*; | ||
|
||
public class JsonArray extends SimpleNode { | ||
public List<Json> items = new ArrayList<>(); | ||
|
||
public JsonArray(int id) { | ||
super(id); | ||
} | ||
|
||
public void toString(final Map<String, Object> params, final StringBuilder builder) { | ||
builder.append("["); | ||
boolean first = true; | ||
for (final Json item : items) { | ||
if (!first) { | ||
builder.append(", "); | ||
} | ||
item.toString(params, builder); | ||
|
||
first = false; | ||
} | ||
builder.append("]"); | ||
} | ||
|
||
public JsonArray copy() { | ||
final JsonArray result = new JsonArray(-1); | ||
result.items = items.stream().map(x -> x.copy()).collect(Collectors.toList()); | ||
return result; | ||
} | ||
|
||
@Override | ||
protected Object[] getIdentityElements() { | ||
return new Object[] { items }; | ||
} | ||
|
||
} | ||
/* JavaCC - OriginalChecksum=beafb9a5a435d346cad52bf835b7a2df (do not edit this line) */ |
Oops, something went wrong.