Simplify SQL command. Add limit.

This commit is contained in:
AB
2021-01-05 03:30:21 +03:00
parent 83a6045b18
commit 47906fe22d
3 changed files with 136 additions and 185 deletions

View File

@ -20,9 +20,11 @@ pub enum Error {
JsonParseError(serde_error),
PopenError(popen_error),
MystemError(mystem_error),
SQLBannedCommand,
SQLBannedCommand(String),
SQLInvalidCommand,
SQLResultTooLong(String),
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "An error occurred.")