grepros 1.3.0
grep for ROS bag files and live topics
Loading...
Searching...
No Matches
SqlMixin Class Reference
Inheritance diagram for SqlMixin:
Inheritance graph

Public Member Functions

 __init__ (self, args=None, **kwargs)
 
 close (self)
 
 validate (self)
 

Public Attributes

 DIALECTS
 

Static Public Attributes

 DEFAULT_ARGS = dict(WRITE_OPTIONS={})
 Constructor argument defaults.
 
str DEFAULT_DIALECT = "sqlite"
 Default SQL dialect used if dialect not specified.
 
dict DIALECTS
 Supported SQL dialects and options.
 
list KEYWORDS
 Words that need quoting if in name context, like table name.
 

Detailed Description

Base class for producing SQL for topics and messages.

Can load additional SQL dialects or additional options for existing dialects
from a YAML/JSON file.

Definition at line 25 of file sqlbase.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  args = None,
**  kwargs 
)
@param   args                 arguments as namespace or dictionary, case-insensitive
@param   args.write_options   ```
                              {"dialect": SQL dialect if not default,
                               "nesting": true|false to created nested type tables}
                              ```
@param   kwargs               any and all arguments as keyword overrides, case-insensitive

Reimplemented in BaseDataSink, PostgresSink, SqliteSink, and SqlSink.

Definition at line 40 of file sqlbase.py.

Member Function Documentation

◆ close()

close (   self)
Clears data structures.

Reimplemented in BaseDataSink, and SqlSink.

Definition at line 117 of file sqlbase.py.

◆ validate()

validate (   self)
Returns whether arguments are valid.

Verifies that "dialect-file" is valid and "dialect" contains supported value, if any.

Reimplemented in BaseDataSink, PostgresSink, SqliteSink, and SqlSink.

Definition at line 57 of file sqlbase.py.

Member Data Documentation

◆ DEFAULT_ARGS

DEFAULT_ARGS = dict(WRITE_OPTIONS={})
static

Constructor argument defaults.

Definition at line 37 of file sqlbase.py.

◆ DEFAULT_DIALECT

str DEFAULT_DIALECT = "sqlite"
static

Default SQL dialect used if dialect not specified.

Definition at line 34 of file sqlbase.py.

◆ DIALECTS [1/2]

DIALECTS

Definition at line 87 of file sqlbase.py.

◆ DIALECTS [2/2]

dict DIALECTS
static

Supported SQL dialects and options.

Definition at line 386 of file sqlbase.py.

◆ KEYWORDS

list KEYWORDS
static

Words that need quoting if in name context, like table name.

Combined from reserved words for Postgres, SQLite, MSSQL, Oracle et al.

Definition at line 522 of file sqlbase.py.


The documentation for this class was generated from the following file: