Skip to content

Releases: maple-dsl/maple-dsl

Release-1.0.3

23 Jan 11:01
Compare
Choose a tag to compare

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

17 Dec 16:53
Compare
Choose a tag to compare

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 redundant id,src,dst on them. d5d3a86

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

15 Dec 10:05
Compare
Choose a tag to compare

Deprecated version

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 redundant id,src,dst on them. d5d3a86

Release-1.0.0

24 Nov 16:00
b816439
Compare
Choose a tag to compare

[Language]

  • NebulaGraph(nGQL)
  • Neo4j/RedisGraph(cypher)

[Dialect]

  • Fetch vertex & edge
  • Match vertex & edge
  • Traverse from VID or match_clause

More detail-cases will updating in Wiki.