mirror of
https://github.com/LemmyNet/lemmy.git
synced 2025-01-18 20:40:14 +00:00
fmt
This commit is contained in:
parent
b6102dcbf2
commit
1a18350aca
|
@ -252,11 +252,18 @@ fn remove_skipped_item_from_beginning(s: &str) -> Option<&str> {
|
||||||
Some(after_first_occurence(after, "\n"))
|
Some(after_first_occurence(after, "\n"))
|
||||||
}
|
}
|
||||||
// Skip old views and fast table triggers
|
// 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 OR REPLACE VIEW "))
|
||||||
.or_else(|| s.strip_prefix("CREATE MATERIALIZED 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(|| {
|
||||||
.or_else(|| s.strip_prefix("CREATE TRIGGER ").and_then(after_skipped_trigger_name)/*.and_then(|a| a.strip_prefix(' '))*/)
|
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"))
|
Some(after_first_occurence(after, "\n\n"))
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -143,3 +143,4 @@ SELECT
|
||||||
NULL AS subscribed
|
NULL AS subscribed
|
||||||
FROM
|
FROM
|
||||||
all_community ac;
|
all_community ac;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue