Use the same order in #[derive()] for all AST types

(So that adding another trait can be done with a global search and replace.)
This commit is contained in:
Nickolay Ponomarev 2019-04-06 01:35:58 +03:00
parent e113dee7e8
commit 31b6076d05
2 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/// SQL Operator /// SQL Operator
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, Clone, PartialEq)]
pub enum SQLOperator { pub enum SQLOperator {
Plus, Plus,
Minus, Minus,

View file

@ -1,6 +1,6 @@
use super::{SQLIdent, SQLObjectName}; use super::{SQLIdent, SQLObjectName};
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, Clone, PartialEq)]
pub enum AlterOperation { pub enum AlterOperation {
AddConstraint(TableKey), AddConstraint(TableKey),
RemoveConstraint { name: SQLIdent }, RemoveConstraint { name: SQLIdent },
@ -17,13 +17,13 @@ impl ToString for AlterOperation {
} }
} }
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, Clone, PartialEq)]
pub struct Key { pub struct Key {
pub name: SQLIdent, pub name: SQLIdent,
pub columns: Vec<SQLIdent>, pub columns: Vec<SQLIdent>,
} }
#[derive(Debug, PartialEq, Clone)] #[derive(Debug, Clone, PartialEq)]
pub enum TableKey { pub enum TableKey {
PrimaryKey(Key), PrimaryKey(Key),
UniqueKey(Key), UniqueKey(Key),