Skip to main content

token_reads

Function token_reads 

Source
pub fn token_reads(text: &str) -> (Vec<TableName>, Vec<TableName>)
Expand description

(tables read, tables written) found in the tokens of a statement that could not be parsed.

A name after FROM, JOIN, USING or TABLE is read (FROM a, b reads both), one after INTO, UPDATE, MERGE or CREATE ... TABLE|VIEW is written, and a CREATE also reads what it LIKEs or CLONEs. A name is a CTE, not a table, only where its WITH is in scope.