module Neo4j::Model

Defined in:

neo4j/associations/belongs_to.cr
neo4j/associations/belongs_to_many.cr
neo4j/associations/has_many.cr
neo4j/associations/has_one.cr
neo4j/base.cr
neo4j/callbacks.cr
neo4j/persistence.cr
neo4j/querying.cr
neo4j/relationship.cr
neo4j/scopes.cr
neo4j/undeclared_properties.cr
neo4j/validation.cr

Constant Summary

ConnectionPool = ::ConnectionPool(Bolt::Connection).new(capacity: Neo4jModel.settings.pool_size) do Bolt::Connection.new(Neo4jModel.settings.neo4j_bolt_url, ssl: false) end

Instance Method Summary

Macro Summary

Instance Method Detail

def [](key : Symbol | String) : Neo4j::Value | Nil #

[View source]
def []=(key : Symbol | String, val : Neo4j::Value) : Neo4j::Value #

[View source]
def []?(key : Symbol | String) : Neo4j::Value | Nil #

[View source]
def errors #

[View source]
def get(prop : String | Symbol) : Neo4j::Value | Nil #

[View source]
def get_bool(prop : Symbol | String) : Bool | Nil #

[View source]
def get_i(prop : Symbol | String) : Int32 | Nil #

[View source]
def get_s(prop : String | Symbol) : String | Nil #

[View source]
def id : String | Nil #

id works differently from uuid because sometimes presence of id is used like #persisted? but in our case, for various reasons, we assign a uuid even before the node is created


[View source]
def label : String #

[View source]
def new_record? : Bool #

[View source]
def persisted? : Bool #

[View source]
def reload : Bool #

[View source]
def save(*, skip_callbacks = false) : Bool #

[View source]
def set(prop : String | Symbol, val : Neo4j::Value) #

[View source]
def set_attributes(from node : Neo4j::Node) : Bool #

[View source]
def set_attributes(hash : Hash(String, PropertyType)) : Bool #

[View source]
def touch : Bool #

[View source]
def update(hash : Hash(String, PropertyType)) : Bool #

[View source]
def update(**params) : Bool #

[View source]
def update_columns(hash : Hash(String, PropertyType)) : Bool #

[View source]
def update_columns(**params) : Bool #

[View source]
def uuid : String #

[View source]
def valid?(*, skip_callbacks = false) #

[View source]

Macro Detail

macro belongs_to(klass, *, rel_type, name = "", plural = "", unique = true) #

equivalent of ActiveNode has_one :in


[View source]
macro belongs_to_many(klass, *, rel_type, name = "", unique = true) #

equivalent of ActiveNode has_many :in


[View source]
macro has_many(klass, *, rel_type, name = "", unique = true) #

equivalent of ActiveNode has_many :out


[View source]
macro has_one(klass, *, rel_type, name = "", plural = "", unique = true) #

equivalent of ActiveNode has_one :out


[View source]
macro scope(name, proc) #

[View source]