mtag: sql Class Reference

- Main Page
- Classes
- Files

- Class List
- Class Members

# sql Class Reference

`#include <sql.h>`

List of all members.

## Static Public Member Functions
static void | setDataBase (const char *filename)
static int | openDB (sqlite3 **db)
static int | closeDB (sqlite3 *db)
static int | addTag (const char *filename, const char *tag)
static int | addTag (const char *filename, const char *tag, sqlite3 *db)
static int | clearTags (const char *filename)
static int | clearTags (const char *filename, sqlite3 *db)
static int | search (const char *tag, TagLib::StringList *files)
static int | search (const char *tag, TagLib::StringList *files, sqlite3 *db)
static int | wipePath (const char *path)
static int | wipePath (const char *path, sqlite3 *db)
static int | list (TagLib::StringList *tags)
static int | list (TagLib::StringList *tags, sqlite3 *db)

## Detailed Description

handles sql things.

## Member Function Documentation

void sql::setDataBase | ( | const char * | filename | ) | `[static]`

set database file

Parameters:

  | filename | path to databse file

int sql::openDB | ( | sqlite3 ** | db | ) | `[static]`

open the database.

Parameters:

  | db | database handle

int sql::closeDB | ( | sqlite3 * | db | ) | `[static]`

close the database.

Parameters:

  `[in]` | db | database handle

int sql::addTag | ( | const char * | filename,
|  | const char * | tag |
| ) |  |  | `[static]`

add tag to file.

Parameters:

  `[in]` | filename | target file
  `[in]` | tag | tag to add

int sql::addTag | ( | const char * | filename,
|  | const char * | tag,
|  | sqlite3 * | db |
| ) |  |  | `[static]`

See also:
  sql::addTag

int sql::clearTags | ( | const char * | filename | ) | `[static]`

clear tags of file.

Parameters:

  `[in]` | filename | target file

int sql::clearTags | ( | const char * | filename,
|  | sqlite3 * | db |
| ) |  |  | `[static]`

See also:
  sql::clearTags

int sql::search | ( | const char * | tag,
|  | TagLib::StringList * | files |
| ) |  |  | `[static]`

search for files with certain tag.

Parameters:

  `[in]` | tag | tag to search for
  `[out]` | files | list of files tagged with tag

int sql::search | ( | const char * | tag,
|  | TagLib::StringList * | files,
|  | sqlite3 * | db |
| ) |  |  | `[static]`

See also:
  search

int sql::wipePath | ( | const char * | path | ) | `[static]`

wipe all tags from files with filname like path%

Parameters:

  `[in]` | path | path to wipe

int sql::wipePath | ( | const char * | path,
|  | sqlite3 * | db |
| ) |  |  | `[static]`

See also:
  wipePath

int sql::list | ( | TagLib::StringList * | tags | ) | `[static]`

list all tags.

Parameters:

  `[out]` | tags | list of tags

int sql::list | ( | TagLib::StringList * | tags,
|  | sqlite3 * | db |
| ) |  |  | `[static]`

See also:
  list

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

- sql.h
- sql.cpp