application_vnd_sqlite¶
Strategy class for application/vnd.sqlite3.
SqLiteParseContent
¶
Bases: AttrDict
Configuration model for SqLiteParse.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
82 83 84 85 |
|
result: list = Field(..., description='List of results from the query.')
class-attribute
instance-attribute
¶
SqliteConfig
¶
Bases: AttrDict
Configuration data model for
SqliteParseStrategy
.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|
datacache_config: Optional[DataCacheConfig] = Field(None, description='Configuration options for the local data cache.')
class-attribute
instance-attribute
¶
downloadUrl: Optional[HostlessAnyUrl] = Field(None, description=ResourceConfig.model_fields['downloadUrl'].description)
class-attribute
instance-attribute
¶
mediaType: Literal['application/vnd.sqlite3'] = Field('application/vnd.sqlite3', description=ResourceConfig.model_fields['mediaType'].description)
class-attribute
instance-attribute
¶
sqlquery: str = Field('', description='A SQL query string.')
class-attribute
instance-attribute
¶
SqliteParseStrategy
¶
Parse strategy for SQLite.
Purpose of this strategy: Download a SQLite database using downloadUrl
and run a
SQL query on the database to return all relevant rows.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
parse_config: SqliteParserConfig
instance-attribute
¶
get()
¶
Parse SQLite query responses.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
initialize()
¶
Initialize strategy.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
99 100 101 |
|
SqliteParserConfig
¶
Bases: ParserConfig
SQLite parse strategy resource config.
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
51 52 53 54 55 56 57 58 59 60 |
|
configuration: SqliteConfig = Field(..., description='SQLite parse strategy-specific configuration.')
class-attribute
instance-attribute
¶
parserType: Literal['parser/sqlite3'] = Field('parser/sqlite3', description=ParserConfig.model_fields['parserType'].description)
class-attribute
instance-attribute
¶
create_connection(db_file)
¶
Create a database connection to SQLite database.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
db_file |
Path
|
Full path to SQLite database file. |
required |
Raises:
Type | Description |
---|---|
Error
|
If a DB connection cannot be made. |
Returns:
Type | Description |
---|---|
Connection
|
Connection object. |
Source code in oteapi/strategies/parse/application_vnd_sqlite.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|