2022-01-16 20:31:50 +00:00
|
|
|
use crate::sql::error::IResult;
|
2022-01-13 17:36:41 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use std::fmt;
|
2022-05-04 21:40:41 +00:00
|
|
|
use std::ops::Deref;
|
2022-01-13 17:36:41 +00:00
|
|
|
use std::str;
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Serialize, Deserialize)]
|
2022-05-04 21:40:41 +00:00
|
|
|
pub struct Script(pub String);
|
|
|
|
|
|
|
|
impl Deref for Script {
|
|
|
|
type Target = String;
|
|
|
|
fn deref(&self) -> &Self::Target {
|
|
|
|
&self.0
|
|
|
|
}
|
2022-01-13 17:36:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl fmt::Display for Script {
|
|
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
2022-05-04 21:40:41 +00:00
|
|
|
write!(f, "\"{}\"", self.0)
|
2022-01-13 17:36:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-02-23 13:20:00 +00:00
|
|
|
pub fn script(_: &str) -> IResult<&str, Script> {
|
|
|
|
unimplemented!()
|
2022-01-13 17:36:41 +00:00
|
|
|
}
|