Releases: maple-dsl/maple-dsl
Release-1.0.3
Refactor
Define edge structure
class Impact extends Model.E<String> {
}
It changes must be declare bothID
type and src&dst
type
class Impact extends Model.E<String, String> {
}
It helps a lot when using nebula-graph
, because it used src_vid->dst_vid@rank
as edge_id in nebula.
It specifies the edge rank of the same edge type. The data type is int. If not specified, the default value is 0. You can insert many edges with the same edge type, source vertex, and destination vertex by using different rank values.
class Impact extends NebulaModel.E<String> {
}
class NebulaModel.E extends Model.E<NebulaEdgeID<R>, R> {
}
Fetch edge wrapper
edge("impact", "edge_id_001", "edge_id_002");
using maple-dsl-nebula
edge("impact", new NebulaEdgeID("src_vid_001", "dst_vid_002", 1L));
The NebulaEdgeID
implements ID
to render its fragment, it also work for other custom workaround (e.g. guid_object_identifer).
class NebulaEdgeID<R> implements ID {
private final R src;
private final R dst;
private final long rank;
public NebulaEdgeID(R src, R dst) {
this(src, dst, 0L);
}
public NebulaEdgeID(R src, R dst, long rank) {
if (src == null) throw new MapleDslException("NebulaEdge#src must not be null.");
if (dst == null) throw new MapleDslException("NebulaEdge#dst must not be null.");
if (rank < 0) throw new MapleDslException("NebulaEdge#rank must not be negative.");
this.src = src;
this.dst = dst;
this.rank = rank;
}
@Override
public String fragment() {
return src instanceof String && dst instanceof String ?
quote((String) src) + "->" + quote(((String) dst)) + "@" + rank :
src + "->" + dst + "@" + rank;
}
}
Full Changelog: v1.0.2...v1.0.3
Release-1.0.2
Feature
Nebula session support #9
Bugfix
- comparison syntax error d5d3a86
- template ordering clause logic
||
as&&
. d5d3a86 node/relationship element_id not allowed assign in manual, so it should declare redundantd5d3a86id
,src
,dst
on them.
Appendix
Release v1.0.1
is deprecated, use v1.0.2
if it refs maple-dsl-cypher
dependency in your project.
Inv1.0.2#maple-dsl-cypher
, it support internal
& custom_id
in both. 9824298
MapleDslConfiguration customIdConfiguration =
MapleDslConfiguration.primaryConfiguration(it -> it.keyPolicyStrategy(KeyPolicyStrategies.MANUAL));
MapleDslConfiguration internalIdConfiguration =
MapleDslConfiguration.primaryConfiguration(it -> it.keyPolicyStrategy(KeyPolicyStrategies.INTERNAL));
Release-1.0.1
Release-1.0.0
[Language]
- NebulaGraph(nGQL)
- Neo4j/RedisGraph(cypher)
[Dialect]
- Fetch vertex & edge
- Match vertex & edge
- Traverse from
VID
ormatch_clause
More detail-cases will updating in Wiki.