Fix cargo docs / warnings and add CI check (#777)

* Fix all rustdoc links

* Add docs CI check

* workflow

* test error

* fix yml

* fix yml

* Revert "test error"

This reverts commit 96a40a88a3.

* fix

* more
This commit is contained in:
Andrew Lamb 2022-12-29 07:53:51 -05:00 committed by GitHub
parent 072ccc0d76
commit b93d82dfca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 79 additions and 26 deletions

View file

@ -1181,8 +1181,10 @@ impl<'a> Parser<'a> {
})
}
/// TRIM ([WHERE] ['text' FROM] 'text')\
/// ```sql
/// TRIM ([WHERE] ['text' FROM] 'text')
/// TRIM ('text')
/// ```
pub fn parse_trim_expr(&mut self) -> Result<Expr, ParserError> {
self.expect_token(&Token::LParen)?;
let mut trim_where = None;
@ -2984,8 +2986,10 @@ impl<'a> Parser<'a> {
})
}
/// ```sql
/// DROP FUNCTION [ IF EXISTS ] name [ ( [ [ argmode ] [ argname ] argtype [, ...] ] ) ] [, ...]
/// [ CASCADE | RESTRICT ]
/// ```
fn parse_drop_function(&mut self) -> Result<Statement, ParserError> {
let if_exists = self.parse_keywords(&[Keyword::IF, Keyword::EXISTS]);
let func_desc = self.parse_comma_separated(Parser::parse_drop_function_desc)?;
@ -3019,8 +3023,10 @@ impl<'a> Parser<'a> {
Ok(DropFunctionDesc { name, args })
}
/// ```sql
/// DECLARE name [ BINARY ] [ ASENSITIVE | INSENSITIVE ] [ [ NO ] SCROLL ]
// CURSOR [ { WITH | WITHOUT } HOLD ] FOR query
/// CURSOR [ { WITH | WITHOUT } HOLD ] FOR query
/// ```
pub fn parse_declare(&mut self) -> Result<Statement, ParserError> {
let name = self.parse_identifier()?;
@ -4822,7 +4828,7 @@ impl<'a> Parser<'a> {
/// Parse a "query body", which is an expression with roughly the
/// following grammar:
/// ```text
/// ```sql
/// query_body ::= restricted_select | '(' subquery ')' | set_operation
/// restricted_select ::= 'SELECT' [expr_list] [ from ] [ where ] [ groupby_having ]
/// subquery ::= query_body [ order_by_limit ]
@ -6130,7 +6136,7 @@ impl<'a> Parser<'a> {
}
/// Parse a TOP clause, MSSQL equivalent of LIMIT,
/// that follows after SELECT [DISTINCT].
/// that follows after `SELECT [DISTINCT]`.
pub fn parse_top(&mut self) -> Result<Top, ParserError> {
let quantity = if self.consume_token(&Token::LParen) {
let quantity = self.parse_expr()?;
@ -6449,8 +6455,11 @@ impl<'a> Parser<'a> {
})
}
/// https://www.postgresql.org/docs/current/sql-createsequence.html
/// ```sql
/// CREATE [ { TEMPORARY | TEMP } ] SEQUENCE [ IF NOT EXISTS ] <sequence_name>
/// ```
///
/// See [Postgres docs](https://www.postgresql.org/docs/current/sql-createsequence.html) for more details.
pub fn parse_create_sequence(&mut self, temporary: bool) -> Result<Statement, ParserError> {
//[ IF NOT EXISTS ]
let if_not_exists = self.parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]);