pub struct SchemaField<const N: usize> {
    pub identifier: &'static str,
    /* private fields */
}

Fields§

§identifier: &'static str

Implementations§

Return the name of the field, and if the field is an edge then return the name of the edge instead.

Example
#![allow(incomplete_features)]
#![feature(generic_const_exprs)]
use surreal_simple_querybuilder::prelude::*;

model!(Test {
  normal_field,
  ->edge->Test as test_edge
});

assert_eq!("normal_field", schema::model.normal_field.name());
assert_eq!("edge", schema::model.test_edge.name());

Trait Implementations§

Formats the value using the given formatter. Read more
Converts this type into the (usually inferred) input type.
Serialize this value into the given Serde serializer. Read more
Take the current string and add = $current_string after it Read more
Draws the start of a relation ->node Read more
Draws the end of a relation <-node Read more
Take the current string and add in front of it the given label name as to make a string of the following format LabelName:CurrentString Read more
Example Read more
Take the current string add add > value after it Read more
Example Read more
Example Read more
Example Read more
Example Read more
Example Read more
Take the current string and add as alias after it Read more
Take the current string, extract the last segment if it is a nested property, then add parenthesis around it and add the supplied condition in them. Read more
write a comma at the end of the string and append right after it. Read more
write a count() around the current string so that it sits between the parenthesis. Read more
Add the supplied id right after the current string in order to get the a new string in the following format current:id Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.