From da137a7175a751b911dc3e76a9495e0f59332510 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Sun, 11 Sep 2022 11:11:27 +0800 Subject: [PATCH] fix readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3477640..e82df23 100644 --- a/README.md +++ b/README.md @@ -134,6 +134,11 @@ migrate(make_migrations()) ### Data Model Method ```python +from example.models import VirtualCharacter, Figure, Source, LimitedCharacter, Love, Support +from nebula_model.models.models import EdgeModel, Limit +from datetime import datetime + + # create/update vertex VirtualCharacter( vid='char_test1', figure=Figure( @@ -164,6 +169,9 @@ EdgeModel(src_vid='char_test1', dst_vid='char_test2', ranking=0, edge_type=Suppo character1 = VirtualCharacter.objects.get('char_test1') character2 = VirtualCharacter.objects.get('char_test2') +# find the exact edge by src_vid, dst_vid and edge type +edge1 = EdgeModel.objects.get('char_test1', 'char_test2', Love) + # find all edges between vertexes EdgeModel.objects.find_between('char_test1', 'char_test2', limit=Limit(10)) # find specific edges between vertexes @@ -244,7 +252,7 @@ async def what_a_complex_human_relation(character_id: str): - [ ] Indexes - [ ] TTL on schema - [ ] Go / Fetch / Lookup statements -- [x] Session Pool (partially, might implement a better one later base on nebula-python) +- [x] Session / Connection Pool (partially, might implement a better one later base on nebula-python) - [ ] More abstractions on different scenarios - [ ] Default values for schema models - [ ] Generic Vertex Model \ No newline at end of file