Skip to content

Db

numbat.db

SqliteHelper

Helper class for sqlite operation

connect staticmethod

connect(path)

Wrapper for sqlite3 connect method so the api doesn't rely directly on sqlite and his more general

Parameters:

Name Type Description Default
path str

The path to the database, if the path doesn't point to an existing file, a new database file will be created

required

Returns:

Type Description
Connection

A connection handle that can be used for future operation on the database

exec staticmethod

exec(database, request, parameters=())

Execute the sqlite request without returning the result

Parameters:

Name Type Description Default
database Connection

A database handle

required
request str

The SQL request to execute

required
parameters tuple

A tuple containing values for the bind parameters of the SQL request (if any)

()

Returns:

Type Description
int

The id of the last modified row (useful in case insertion)

fetch staticmethod

fetch(database, request, parameters=())

Return the result of the sqlite request as list

Parameters:

Name Type Description Default
database Connection

A database handle

required
request str

The SQL request to execute

required
parameters tuple

A tuple containing values for the bind parameters of the SQL request (if any)

()

Returns:

Type Description
list

A list containing the results of the SQL request

ElementDAO

This class is a static class that can manipulate Element objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the element table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the element table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Element inside the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Element

The object to insert

required

Returns:

Type Description
int

The id of the inserted element

delete staticmethod

delete(database, obj)

Delete an Element from the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Element

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Elements from the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return an element from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the element to retrieve

required

Returns:

Type Description
Element

A Element object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an Element inside the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Element

The Element object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the elements from the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Element]

The list of Elements

ElementComponentDAO

This class is a static class that can manipulate ElementComponent objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the element_component table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the element_component table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new ElementComponent inside the element_component table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ElementComponent

The object to insert

required

Returns:

Type Description
int

The id of the inserted element

delete staticmethod

delete(database, obj)

Delete an ElementComponent from the element_component table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ElementComponent

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all ElementComponents from the element_component table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a ElementComponent from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the element_component to retrieve

required

Returns:

Type Description
ElementComponent

A ElementComponent object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an ElementComponent inside the element_component table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ElementComponent

The Element object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the elements from the element_component table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[ElementComponent]

The list of ElementComponents

EdgeDAO

This class is a static class that can manipulate Edge objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the edge table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the edge table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Edge inside the edge table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Edge

The object to insert

required

Returns:

Type Description
int

The id of the inserted element

delete staticmethod

delete(database, obj)

Delete an Edge from the edge table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Edge

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Edges from the edge table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return an Edge from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the element to retrieve

required

Returns:

Type Description
Edge

A Edge object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an Edge inside the element table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Edge

The Edge object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the elements from the edge table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Edge]

The list of Edges

NodeDAO

This class is a static class that can manipulate Node objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the node table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the node table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Node inside the node table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Node

The object to insert

required

Returns:

Type Description
int

The id of the inserted element

delete staticmethod

delete(database, obj)

Delete a Node from the node table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Node

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Nodes from the node table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a Node from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the element to retrieve

required

Returns:

Type Description
Node

A Node object that reflect the content inside the database

get_by_name staticmethod

get_by_name(database, name)

Return a Node from the database with the matching serialized_name

Parameters:

Name Type Description Default
database Connection

A database handle

required
name str

The serialized_name of the element to retrieve

required

Returns:

Type Description
Node

A Node object that reflect the content inside the database

update staticmethod

update(database, obj)

Update a Node inside the node table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Node

The Node object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the elements from the node table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Node]

The list of Nodes

SymbolDAO

This class is a static class that can manipulate Symbol objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the symbol table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the symbol table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Symbol inside the symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Symbol

The object to insert

required

Returns:

Type Description
int

The id of the inserted symbol

delete staticmethod

delete(database, obj)

Delete a Symbol from the symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Symbol

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Symbols from the symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a symbol from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the symbol to retrieve

required

Returns:

Type Description
Symbol

A Symbol object that reflect the content inside the database

update staticmethod

update(database, obj)

Update a Symbol inside the symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Symbol

The Symbol object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the symbols from the symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Symbol]

The list of Symbols

FileDAO

This class is a static class that can manipulate File objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the file table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the file table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new File inside the file table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj File

The object to insert

required

Returns:

Type Description
int

The id of the inserted file

delete staticmethod

delete(database, obj)

Delete a File from the file table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj File

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Files from the file table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a file from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the file to retrieve

required

Returns:

Type Description
File

A File object that reflect the content inside the database

update staticmethod

update(database, obj)

Update a File inside the file table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj File

The File object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the files from the file table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[File]

The list of Files

FileContentDAO

This class is a static class that can manipulate FileContent objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the filecontent table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the filecontent table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new FileContent inside the filecontent table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj FileContent

The object to insert

required

Returns:

Type Description
int

The id of the inserted filecontent

delete staticmethod

delete(database, obj)

Delete an FileContent from the filecontent table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj FileContent

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all FileContents from the filecontent table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a filecontent from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the filecontent to retrieve

required

Returns:

Type Description
FileContent

A FileContent object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an FileContent inside the filecontent table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj FileContent

The FileContent object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the filecontents from the filecontent table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[FileContent]

The list of FileContents

LocalSymbolDAO

This class is a static class that can manipulate LocalSymbol objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the local_symbol table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the local_symbol table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new LocalSymbol inside the local_symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj LocalSymbol

The object to insert

required

Returns:

Type Description
int

The id of the inserted local_symbol

delete staticmethod

delete(database, obj)

Delete an LocalSymbol from the local_symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj LocalSymbol

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all LocalSymbols from the local_symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a local_symbol from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the local_symbol to retrieve

required

Returns:

Type Description
LocalSymbol

A LocalSymbol object that reflect the content inside the database

get_from_name staticmethod

get_from_name(database, name)

Return a local_symbol from the database with the matching name

Parameters:

Name Type Description Default
database Connection

A database handle

required
name str

The name of the local_symbol to retrieve

required

Returns:

Type Description
LocalSymbol

A LocalSymbol object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an LocalSymbol inside the local_symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj LocalSymbol

The LocalSymbol object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the local_symbols from the local_symbol table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[LocalSymbol]

The list of LocalSymbols

SourceLocationDAO

This class is a static class that can manipulate SourceLocation objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the source_location table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the source_location table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new SourceLocation inside the source_location table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj SourceLocation

The object to insert

required

Returns:

Type Description
int

The id of the inserted source_location

delete staticmethod

delete(database, obj)

Delete an SourceLocation from the source_location table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj SourceLocation

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all SourceLocations from the source_location table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a source_location from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the source_location to retrieve

required

Returns:

Type Description
SourceLocation

A SourceLocation object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an SourceLocation inside the source_location table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj SourceLocation

The SourceLocation object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the source_locations from the source_location table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[SourceLocation]

The list of SourceLocations

OccurrenceDAO

This class is a static class that can manipulate Occurrence objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the occurrence table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the occurrence table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Occurrence inside the occurrence table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Occurrence

The object to insert

required

Returns:

Type Description
int

The id of the inserted occurrence

delete staticmethod

delete(database, obj)

Delete an Occurrence from the occurrence table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Occurrence

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all Occurrences from the occurrence table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return an occurrence from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the occurrence to retrieve

required

Returns:

Type Description
Occurrence

A Occurrence object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an Occurrence inside the occurrence table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Occurrence

The Occurrence object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the occurrences from the occurrence table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Occurrence]

The list of Occurrences

ComponentAccessDAO

This class is a static class that can manipulate ComponentAccess objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the component_access table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the component_access table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new ComponentAccess inside the component_access table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ComponentAccess

The object to insert

required

Returns:

Type Description
int

The id of the inserted component_access

delete staticmethod

delete(database, obj)

Delete an ComponentAccess from the component_access table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ComponentAccess

The object to delete

required

Returns:

Type Description
None

None

clear staticmethod

clear(database)

Delete all ComponentAccess from the component_access table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return a component_access from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the component_access to retrieve

required

Returns:

Type Description
ComponentAccess

A ComponentAccess object that reflect the content inside the database

update staticmethod

update(database, obj)

Update an ComponentAccess inside the component_access table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj ComponentAccess

The ComponentAccess object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the component_access from the component_access table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[ComponentAccess]

The list of ComponentAccess

ErrorDAO

This class is a static class that can manipulate Error objects, inserting and removing them from a sqlite database.

create_table staticmethod

create_table(database)

Create the error table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the error table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, obj)

Insert a new Error inside the error table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Error

The object to insert

required

Returns:

Type Description
int

The id of the inserted error

delete staticmethod

delete(database, obj)

Delete an Error from the error table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Error

The object to delete

required

Returns:

Type Description
None

None

get staticmethod

get(database, elem_id)

Return an error from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
elem_id int

The id of the error to retrieve

required

Returns:

Type Description
Error

A Error object that reflect the content inside the database

clear staticmethod

clear(database)

Delete all Errors from the error table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

update staticmethod

update(database, obj)

Update an Error inside the error table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
obj Error

The Error object to update

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the errors from the error table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[Error]

The list of Errors

MetaDAO

This class is a static class that can manipulate Meta information, inserting and removing them from a sqlite database. There is no Meta object but a simple key, value pair can be used.

create_table staticmethod

create_table(database)

Create the meta table of the Sourcetrail database if it doesn't exist.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

delete_table staticmethod

delete_table(database)

Delete the meta table of the Sourcetrail database only if it exists.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

new staticmethod

new(database, key, value)

Insert a new Meta inside the meta table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
key str

The key to insert

required
value str

The value to insert

required

Returns:

Type Description
int

The id of the inserted meta

delete staticmethod

delete(database, id_)

Delete a Meta from the meta table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
id_ int

The identifier of the object to delete

required

Returns:

Type Description
None

None

get staticmethod

get(database, id_)

Return a meta from the database with the matching id

Parameters:

Name Type Description Default
database Connection

A database handle

required
id_ int

The id of the meta to retrieve

required

Returns:

Type Description
tuple[int, str, str]

A Meta object that reflect the content inside the database

clear staticmethod

clear(database)

Delete all Metas from the meta table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
None

None

update staticmethod

update(database, id_, key, value)

Update a Meta inside the meta table.

Parameters:

Name Type Description Default
database Connection

A database handle

required
id_ int

The id of the meta to update

required
key str

The key to update

required
value str

The value to insert

required

Returns:

Type Description
None

None

list staticmethod

list(database)

Return the list of all the metas from the meta table.

Parameters:

Name Type Description Default
database Connection

A database handle

required

Returns:

Type Description
list[tuple[int, str, str]]

The list of Metas