DBInterface contains the following functions:
| Function | Description |
|---|---|
InitializeSingleUserDatabase() |
For single-user Transana only, this initializes (starts) the embedded MySQL Server. |
EndSingleUserDatabase() |
For single-user Transana only, this ends (exits) the embedded MySQL Server. |
SetTableType() |
Set Table Type and Character Set Information for the database as appropriate |
is_db_open() |
Quick and dirty test to see if the database is currently open |
establish_db_exists() |
Check for the existence of all database tables and create them if necessary. |
get_db() |
Get a connection object reference to the database. If a connection has not yet been established, then create the connection. |
close_db() |
This method flushes all database tables (saving data to disk) and closes the Database Connection. |
get_username() |
Get the name of the current database user. |
list_of_series() |
Get a list of all Series record names. |
list_of_episodes() |
Get a list of all Episode records. |
list_of_episodes_for_series() |
Get a list of all Episodes contained within a named Series. |
list_of_episode_transcripts() |
Get a list of all Episode Transcript records. |
list_transcripts() |
Get a list of all Transcripts for the named Episode within the named Series. |
list_of_collections() |
Get a list of all collections for under the given parent record. By default, the root parent (0) record is used. |
list_of_all_collections() |
Get a list of all collections. |
locate_quick_clips_collection() |
Determine the collection number of the Quick Clips Collection, creating it if necessary. |
list_of_clips() |
Get a list of all Clips, regardless of collection. |
list_of_clips_by_collection() |
Get a list of all Clips for a named Collection. |
list_of_clips_by_collectionnum() |
No description |
list_of_clips_by_episode() |
Get a list of all Clips that have been created from a given Collection Number. Optionally restrict list to contain only a given timecode. |
CheckForDuplicateQuickClip() |
Check to see if there is already a Quick Clip for this video segment. |
getMaxSortOrder() |
Get the largest Sort Order value for all the Clips in a Collection. |
list_of_notes() |
Get a list of Note IDs for the given Series, Episode, Collection, or Clip numbers. Parameters are passed as keyword arguments, where valid parameters are Transcript, Episode, Series, Clip, and Collection. Examples: list_of_notes(Series=12) list_of_notes(Episode=14) The optional parameter "includeNumber=True" causes (note number, note id) tuples to be returned rather than just a list of note ids. |
list_of_node_notes() |
Get a list of all Notes for the given Series or Collection node, including sub-nodes. Valid parameters are SeriesNode=True or CollectionNode=True. |
list_of_all_notes() |
Get a list of all Notes for the Notes Browser |
list_of_keyword_groups() |
Get a list of all keyword groups. |
list_of_keywords_by_group() |
Get a list of all keywords for the named Keyword group. |
list_of_all_keywords() |
Get a list of all keywords in the Transana database. |
list_of_keywords() |
Get a list of all keywordgroup/keyword pairs for the specified qualifiers (Episode, Clip numbers). Result is a list of tuples, where the first element in the tuple is the keyword group, the second element is the keyword itself, and the third element indicates whether the keyword is an example or not. examples: list_of_keywords(Episode=5) list_of_keywords(Clip=1) list_of_keywords(Episode=5, Clip=1) |
list_of_keyword_examples() |
Get a list of all Keyword Examples from the ClipKeywords table. |
SetKeywordExampleStatus() |
The SetKeywordExampleStatus(kwg, kw, clipNum, exampleValue) method sets the Example value in the ClipKeywords table for the appropriate KWG, KW, Clip combination. Set Example to 1 to specify a Keyword Example, 0 to remove it from being an example without deleting the keyword for the Clip. |
check_username_as_keyword() |
Determine if the username is already a keyword, creating it if necessary. |
VideoFilePaths() |
This method returns the number of Collections and Clips that would be affected by implementing the Video Root Path, and optionally makes the changes. |
IsDatabaseEmpty() |
Returns True if the database is empty, False if there are ANY data records |
fetch_named() |
Fetch a row result from the cursor object, but return it as a dictionary including the database field names. Optionally specify an already-fetched row result by passing the optional `row_result' as something other than None. |
fetchall_named() |
Fetch all row results from the cursor object, and return it as a sequence of dictionaries including the database field names. |
list_all_keyword_examples_for_all_clips_in_a_collection() |
Lists all Keyword Examples for all Clips in the specified Collection and all nested Collections recursively |
list_all_keyword_examples_for_a_clip() |
Lists all Keyword Examples for the specified Clip. |
delete_all_keywords_for_a_group() |
Given an Episode or a Clip number, delete the keywordgroup/word pairs. |
insert_clip_keyword() |
Insert a new record in the Clip Keywords table. |
add_keyword() |
Add a keyword to the database. |
delete_keyword_group() |
Delete a Keyword Group from the database, including all associated keywords. |
delete_keyword() |
Delete a Keyword from the database. |
delete_filter_records() |
Delete Filter Configuration records of a given reportType with a given reportScope |
record_match_count() |
Find number of records in the given table where the given fields contain the given values. If the field name begins with the `!' character, then it will match only if the value does NOT equal the given field value. |
ProcessDBDataForUTF8Encoding() |
MySQL's UTF8 Encoding isn't straight-forward because of variable character length. For example, the Chinese character 4EB0 is stored as δΊ° . Therefore, we need to do some translation of the data read from the database to get it into the format that wxPython wants. |
UpdateDBFilenames() |
No description |
DeleteDatabase() |
Delete an entire database |
ReportRecordLocks() |
Query the database for Record Locks and build a string that holds the report data. |
UnlockRecords() |
Unlock all locked records by the named User |
ServerDateTime() |
Returns the SERVER's current Date and Time for record lock comparisons |