2022-01-13 17:36:41 +00:00
|
|
|
use crate::dbs::Options;
|
|
|
|
use crate::dbs::Runtime;
|
2022-02-15 01:00:30 +00:00
|
|
|
use crate::dbs::Transaction;
|
2022-01-20 23:00:57 +00:00
|
|
|
use crate::err::Error;
|
2022-01-13 17:36:41 +00:00
|
|
|
use crate::sql::part::Part;
|
|
|
|
use crate::sql::value::Value;
|
|
|
|
|
|
|
|
impl Value {
|
2022-01-20 23:00:57 +00:00
|
|
|
pub async fn first(
|
|
|
|
&self,
|
|
|
|
ctx: &Runtime,
|
2022-02-06 21:06:52 +00:00
|
|
|
opt: &Options,
|
2022-02-15 03:33:16 +00:00
|
|
|
txn: &Transaction,
|
2022-01-20 23:00:57 +00:00
|
|
|
) -> Result<Self, Error> {
|
2022-02-22 19:05:58 +00:00
|
|
|
self.get(ctx, opt, txn, &[Part::First]).await
|
2022-01-13 17:36:41 +00:00
|
|
|
}
|
|
|
|
}
|