vibesql_ast/ddl/
cursor.rs1#[derive(Debug, Clone, PartialEq)]
11pub struct DeclareCursorStmt {
12 pub cursor_name: String,
13 pub insensitive: bool,
14 pub scroll: bool,
15 pub hold: Option<bool>, pub query: Box<crate::SelectStmt>,
18 pub updatability: CursorUpdatability,
19}
20
21#[derive(Debug, Clone, PartialEq)]
23pub enum CursorUpdatability {
24 ReadOnly,
25 Update { columns: Option<Vec<String>> }, Unspecified,
28}
29
30#[derive(Debug, Clone, PartialEq)]
32pub struct OpenCursorStmt {
33 pub cursor_name: String,
34}
35
36#[derive(Debug, Clone, PartialEq)]
38pub struct FetchStmt {
39 pub cursor_name: String,
40 pub orientation: FetchOrientation,
41 pub into_variables: Option<Vec<String>>, }
43
44#[derive(Debug, Clone, PartialEq)]
46pub enum FetchOrientation {
47 Next,
48 Prior,
49 First,
50 Last,
51 Absolute(i64), Relative(i64), }
54
55#[derive(Debug, Clone, PartialEq)]
57pub struct CloseCursorStmt {
58 pub cursor_name: String,
59}