-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hacktober tasks #234
Comments
For anyone would like to take, I'll create corresponding tasks in separate issue. cc @CorvusYe |
Hi @wey-gu, I would like to contribute for the above task, if you could just explain in a little detail what needs to be done exactly. |
Hi @amritagg We need to add methods to NebulaDaoBasic that allow developers to quickly access data without having to write ngql The idea is to extract the more commonly used scripts, as the name of the task item means. For example, show metas, developers can quickly get schema information by calling the interface, tag, edgeType, etc. cc: @wey-gu |
The API is similar to this section, but without the process of parsing the results. |
I want to have a try to achieve And I want to imitate this interface ngbatis/src/main/java/org/nebula/contrib/ngbatis/proxy/NebulaDaoBasic.java Lines 319 to 334 in d6b73ea
@CorvusYe |
@shbone And one more thing is that these interfaces should preferably have a batched parameter. Because there is a limit to the length of a script that can be executed once. |
How to debug and print the nGQL script with Beetl Template? Thank you! @CorvusYe |
@shbone Add the following configuration to yml logging:
level:
org.nebula.contrib: DEBUG https://graph-cn.github.io/ngbatis-docs/step-forward-docs/advanced-configuration.html |
And the only entry and exit for the generated nGQL is here |
I have add the configuration and output is here.
The nGQL script is to insert the batch of edges , and I use the
|
You can refer to this http://bbs.ibeetl.com/beetlonline/ But you need to change |
What do you think ablout declaring a model, such as: public class NgTriplet<I> {
private I srcId;
private I dstId;
private Object start;
private Object edge;
private Object end;
NgTriplet( Object start, Object edge, Object end ) {
// ...
}
} triplets = new ArrayList() {{
add( new NgTriplet( person1, like, person2) );
}}; So that, we can use XML is roughly like this. But there may be some errors, you can debug it again <insert id="insertEdgeBatch">
@for ( row in ng_args[0] ) {
@var kv = ng.kv( row.edge, '', null, null, false );
@var vId1 = ng.id( row.start );
@var rank = ng.id( row.edge, false );
@var vId2 = ng.id( row.end );
@var e = ng.tagName( row.edge );
INSERT EDGE `${ e }` (
${ ng.join( @kv.columns, ", ", "ng.schemaFmt" ) }
)
VALUES ${ vId1 }-> ${ vId2 } ${ isNotEmpty( rank ) ? ('@' + rank) : '' } :(
${ ng.join( @kv.values ) }
);
@}
</insert> |
Thank you your template! I will have a try
|
Feat: add insertEdgeBatch function #234
The text was updated successfully, but these errors were encountered: