Go to the documentation of this file.
14 "hostname, storagegroup, id, basename, filesize, "
15 "video_codec, width, height, aspect, fps, "
16 "audio_codec, audio_channels, audio_sample_rate, "
17 "audio_avg_bitrate, container "
19 "WHERE recordedid = :RECORDEDID ");
64 query.
prepare(
"UPDATE recordedfile "
66 "basename = :FILENAME, "
67 "filesize = :FILESIZE, "
71 "aspect = :ASPECT_RATIO, "
72 "audio_sample_rate = :AUDIO_SAMPLERATE, "
73 "audio_avg_bitrate = :AUDIO_BITRATE, "
74 "audio_channels = :AUDIO_CHANNELS, "
75 "audio_codec = :AUDIO_CODEC, "
76 "video_codec = :VIDEO_CODEC, "
77 "hostname = :STORAGE_DEVICE, "
78 "storagegroup = :STORAGE_GROUP, "
79 "recordedid = :RECORDING_ID, "
80 "container = :CONTAINER "
81 "WHERE id = :FILE_ID ");
86 query.
prepare(
"INSERT INTO recordedfile "
88 "basename = :FILENAME, "
89 "filesize = :FILESIZE, "
93 "aspect = :ASPECT_RATIO, "
94 "audio_sample_rate = :AUDIO_SAMPLERATE, "
95 "audio_avg_bitrate = :AUDIO_BITRATE, "
96 "audio_channels = :AUDIO_CHANNELS, "
97 "audio_codec = :AUDIO_CODEC, "
98 "video_codec = :VIDEO_CODEC, "
99 "hostname = :STORAGE_DEVICE, "
100 "storagegroup = :STORAGE_GROUP, "
101 "recordedid = :RECORDING_ID, "
102 "container = :CONTAINER ");
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
void bindValueNoNull(const QString &placeholder, const QVariant &val)
Add a single binding, taking care not to set a NULL value.
QVariant lastInsertId()
Return the id of the last inserted row.
QVariant value(int i) const
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static QString AVContainerToString(AVContainer format)
QScriptValue formatStr(QScriptContext *context, QScriptEngine *interpreter)
static AVContainer AVContainerFromString(const QString &formatStr)
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
AVContainer m_containerFormat
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
double m_videoAspectRatio
QString m_storageDeviceID
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.