surrealpatch/core/src/fnc/meta.rs
Rushmore Mushambi 690dd55a86
Extract core lib into a standalone crate (#3423)
Co-authored-by: Gerard Guillemas Martos <gerard.guillemas@surrealdb.com>
2024-02-02 22:10:47 +00:00

11 lines
235 B
Rust

use crate::err::Error;
use crate::sql::thing::Thing;
use crate::sql::value::Value;
pub fn id((arg,): (Thing,)) -> Result<Value, Error> {
Ok(arg.id.into())
}
pub fn tb((arg,): (Thing,)) -> Result<Value, Error> {
Ok(arg.tb.into())
}