ORM of nebula-java

Overview

graph-ocean

框架描述

ORM of nebula-java
一个 nebula-java 的 ORM 框架,graph ocean 意为图海洋,
Nebula Graph 的星云相匹配,星辰大海。

设计理念

详细见 graph-ocean 设计文档:https://github.com/Anyzm/graph-ocean/blob/main/graph-ocean-design.md

使用示例

maven项目引入坐标:

<dependency>
  <groupId>io.github.anyzm</groupId>
  <artifactId>graph-ocean</artifactId>
  <version>1.0.0</version>
</dependency>
NebulaGraphMapper nebulaGraphMapper = nebulaGraphMapper(nebulaPoolSessionManager(
                nebulaPool(nebulaPoolConfig())));
        User user = new User("UR123", "张三");
        //保存顶点
        int i = nebulaGraphMapper.saveVertexEntities(Lists.newArrayList(user));
        //查询顶点
        List<User> users = nebulaGraphMapper.fetchVertexTag(User.class, "UR123");
        //保存边和查询边类似
        Follow follow = new Follow("UR123", "UR234", 1);
        //保存边
        nebulaGraphMapper.saveEdgeEntities(Lists.newArrayList(follow));
        //查询出边
        List<Follow> follows = nebulaGraphMapper.goOutEdge(Follow.class, "UR123");
        //查询反向边
        List<Follow> fans = nebulaGraphMapper.goReverseEdge(Follow.class, "UR123");
        //查询API
        VertexQuery query = NebulaVertexQuery.build().fetchPropOn(User.class, "UR123")
                .yield("userName");
        QueryResult rows = nebulaGraphMapper.executeQuery(query);

拥有丰富的 API,详情请见测试用例:com.github.anyzm.graph.ocean.GraphOceanExample

写在最后

由于本框架目前几乎是由一人开发完成,所以难免有些不完善或者不优雅的地方,望大家谅解。
初期最佳实践是下载源码自己在本地根据自己的需要修改,同时也希望能有更多的人能够参与其中一起开发完善这个框架。

You might also like...

Java Exp FrameWork

Exp Poc框架并不少,TangScan、Pocsuite 等等,用python写一个其实是很简单的事情。为什么要重复造这个轮子呢? 看过不少漏洞了,差不多都是本地很杂乱的存放poc,很多语言都有,而且大多数poc也只能弹个计算器而已.....所以很早就想拥有一个属于自己的统一存放Exp的地方,也

Oct 9, 2022

A Simple movies app using JAVA,MVVM and with a offline caching capability

A Simple movies app using JAVA,MVVM and with a offline caching capability

IMDB-CLONE A simple imdb clone using JAVA,MVVM with searching and bookmarking ability with offline caching ability screenshots Home Screen 1 Home Scre

Aug 16, 2022

This repository consists of the code samples, assignments, and the curriculum for the Community Classroom complete Data Structures & Algorithms Java bootcamp.

DSA-Bootcamp-Java Subscribe to our channel Complete Playlist Syllabus Discord for discussions Telegram for announcements Connect with me     Follow Co

Jan 1, 2023

JML - Java Math Library.

JML JML - Java Math Library. JML is a Java Math Library for solving Advanced Mathematical calculations. Disclaimer This project is under heavy develop

Sep 23, 2021

DFA来过滤敏感词工具。--- The sensitive word tool for java with DFA.

sensitive-word-plus sensitive-word-plus 基于 DFA 算法实现的高性能敏感词工具。 站在巨人肩膀上,本项目是根据sensitive-word 做的升级 创作目的 基于sensitive-word-plus 实现返回敏感词类型 实现一款好用敏感词工具。 基于 D

Sep 22, 2022

Data Structure using Java Project

Data Structure using Java Project

CSC348-Data-Structure This repository contains end of semester project for Data Structure (UiTM diploma's subject). It is developed using Java languag

Oct 11, 2021

Simple ATM Machine made with Java

Output / Preview Enter your account number: Enter your pin number: ATM main menu: 1. - View Account Balance 2. - Withdraw funds 3. - Add funds 4. - T

Oct 21, 2021

java math accurate implementation & experiments

Marlin-Math Accurate and fastest Math functions in java, like the Marlin renderer ! Rationale Java supports Quadratic & Cubic curves in Java2D & JavaF

Nov 18, 2021

👨‍🏫ITMO University first 4 labs. They are about object oriented programming and Java language

Java-Programming-1st-semester 1st lab - math operations, formatted output. 2nd lab - object oriented programming. 3rd lab - SOLID and STUPID principle

Dec 1, 2022
Comments
  • 修复一个bug,并优化sql执行效率

    修复一个bug,并优化sql执行效率

    1、修改getSession(String space)方法为无参方法,excute space与sql合并执行,减少io次数,提高并发 2、修复并优化executeBatchUpdateSql方法bug,当sqlList足够大时,一个session执行大量excute操作而不release,会引发异常。设置BATCH_SIZE,合并每500条sql合并成一条sql执行,并release

    opened by rxtm 6
  • 切换 spcae异常。

    切换 spcae异常。

    执行test方法:[main] ERROR io.github.anyzm.graph.ocean.session.NebulaSessionWrapper - 更新nebula异常 code:-1004, msg:SyntaxError: syntax error near `execute', nGql:execute first_space ; UPSERT VERTEX "UR123" SET user.user_name=张三,user.user_no=UR123; 本人环境 3.0,使用 jdk 17运行。 发现问题: 1、execute first_space ; 应该是 use ; 2、UPSERT VERTEX "UR123" SET user.user_name=张三,user.user_no=UR123; 语法错误, 官网语法规则: UPSERT VERTEX ON SET <update_prop> [WHEN ] [YIELD ]

    亲测: UPSERT VERTEX on user "UR123" SET user.user_name="张三",user.user_no="UR123"; 可以运行。

    后续 有考虑 集成到 springboot 中,开发一个 start,自动装配?

    opened by linfahe 4
Owner
Nebula Contrib
Nebula Contrib
Java Statistical Analysis Tool, a Java library for Machine Learning

Java Statistical Analysis Tool JSAT is a library for quickly getting started with Machine Learning problems. It is developed in my free time, and made

null 752 Dec 20, 2022
Hierarchical Temporal Memory implementation in Java - an official Community-Driven Java port of the Numenta Platform for Intelligent Computing (NuPIC).

htm.java Official Java™ version of... Hierarchical Temporal Memory (HTM) Community-supported & ported from the Numenta Platform for Intelligent Comput

Numenta 301 Dec 1, 2022
An Engine-Agnostic Deep Learning Framework in Java

Deep Java Library (DJL) Overview Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is desig

Amazon Web Services - Labs 2.9k Jan 7, 2023
Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox Machine Learning Framework The Datumbox Machine Learning Framework is an open-source framework written in Java which allows the rapid develop

Vasilis Vryniotis 1.1k Dec 9, 2022
java deep learning algorithms and deep neural networks with gpu acceleration

Deep Neural Networks with GPU support Update This is a newer version of the framework, that I developed while working at ExB Research. Currently, you

Ivan Vasilev 1.2k Jan 6, 2023
Java version of LIBLINEAR

This is the Java version of LIBLINEAR. The project site of the original C++ version is located at http://www.csie.ntu.edu.tw/~cjlin/liblinear/ The ups

Benedikt Waldvogel 307 Dec 11, 2022
Learning Based Java (LBJava)

Learning Based Java LBJava core LBJava examples LBJava maven plugin Compiling the whole package From the root directory run the following command: Jus

CogComp 12 Jun 9, 2019
Kodlama IO | JAVA & REACT Projects

Human Resources Management System Creating a human resources system using Java-SpringBoot that can be used by employers, job seekers and system person

Aykut Şahin 23 Oct 19, 2022
An Open Source Java Library for the Rubiks Cube!

?? Table of contents Overview What is Cubot? Why would you want it? Documentation Installation Updates ?? Overview A Java library to help you : Virtua

Akshath Raghav 13 Oct 17, 2022