Skip to main content

hints

Function hints 

Source
pub fn hints(query: &str) -> Result<Vec<&str>>
Expand description

The body of every /*+ ... */ hint in query, in the order they were written.

A hint is a block comment whose first character is a plus, which is how Oracle, MySQL and Spark all spell one, and what comes back is the text between the plus and the closing */ with nothing done to it. What a hint means is not a question for the tokenizer: rudb_seam reads the body, through the same function a SET goes through.

The tokenizer runs rather than a second scanner over the text, because /*+ inside a string literal is not a hint and a second scanner is a second opinion about where a literal ends. It only runs when the text has /*+ in it at all, so a query without a hint pays for one substring search.

ยงErrors

The four the tokenizer throws, since it is the tokenizer doing the work.