mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 00:01:25 +00:00
fmt
This commit is contained in:
parent
b6102dcbf2
commit
1a18350aca
3 changed files with 525 additions and 517 deletions
|
@ -252,11 +252,18 @@ fn remove_skipped_item_from_beginning(s: &str) -> Option<&str> {
|
|||
Some(after_first_occurence(after, "\n"))
|
||||
}
|
||||
// Skip old views and fast table triggers
|
||||
else if let Some(after) = s.strip_prefix("CREATE VIEW ")
|
||||
else if let Some(after) = s
|
||||
.strip_prefix("CREATE VIEW ")
|
||||
.or_else(|| s.strip_prefix("CREATE OR REPLACE VIEW "))
|
||||
.or_else(|| s.strip_prefix("CREATE MATERIALIZED VIEW "))
|
||||
.or_else(|| s.strip_prefix("CREATE FUNCTION public.").and_then(after_skipped_trigger_name)/*.and_then(|a| a.strip_prefix("()"))*/)
|
||||
.or_else(|| s.strip_prefix("CREATE TRIGGER ").and_then(after_skipped_trigger_name)/*.and_then(|a| a.strip_prefix(' '))*/)
|
||||
.or_else(|| {
|
||||
s.strip_prefix("CREATE FUNCTION public.")
|
||||
.and_then(after_skipped_trigger_name)
|
||||
} /* .and_then(|a| a.strip_prefix("()")) */)
|
||||
.or_else(|| {
|
||||
s.strip_prefix("CREATE TRIGGER ")
|
||||
.and_then(after_skipped_trigger_name)
|
||||
} /* .and_then(|a| a.strip_prefix(' ')) */)
|
||||
{
|
||||
Some(after_first_occurence(after, "\n\n"))
|
||||
} else {
|
||||
|
|
|
@ -143,3 +143,4 @@ SELECT
|
|||
NULL AS subscribed
|
||||
FROM
|
||||
all_community ac;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue