mirror of
https://github.com/eliasstepanik/core.git
synced 2026-01-16 23:18:31 +00:00
27 lines
746 B
Haxe
27 lines
746 B
Haxe
// Start writing your queries here.
|
|
//
|
|
// You can use the schema to help you write your queries.
|
|
//
|
|
// Queries take the form:
|
|
// QUERY {query name}({input name}: {input type}) =>
|
|
// {variable} <- {traversal}
|
|
// RETURN {variable}
|
|
//
|
|
// Example:
|
|
// QUERY GetUserFriends(user_id: String) =>
|
|
// friends <- N<User>(user_id)::Out<Knows>
|
|
// RETURN friends
|
|
//
|
|
//
|
|
// For more information on how to write queries,
|
|
// see the documentation at https://docs.helix-db.com
|
|
// or checkout our GitHub at https://github.com/HelixDB/helix-db
|
|
|
|
QUERY hnswinsert(vector: [F64]) =>
|
|
AddV<Embedding>(vector)
|
|
RETURN "Success"
|
|
|
|
QUERY hnswsearch(query: [F64], k: I32) =>
|
|
res <- SearchV<Embedding>(query, k)
|
|
RETURN res
|