| kuzu_execute | R Documentation |
Submits a Cypher query to the Kuzu database for execution. This function is used for all database operations, including schema definition (DDL), data manipulation (DML), and querying (MATCH).
kuzu_execute(conn, query)
conn |
A Kuzu connection object, as returned by |
query |
A string containing the Cypher query to be executed. |
A Python object representing the query result.
conn <- kuzu_connection(":memory:")
# Create a node table
kuzu_execute(conn, "CREATE NODE TABLE User(name STRING, age INT64,
PRIMARY KEY (name))")
# Insert data
kuzu_execute(conn, "CREATE (:User {name: 'Alice', age: 25})")
# Query data
result <- kuzu_execute(conn, "MATCH (a:User) RETURN a.name, a.age")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.