]> git.sesse.net Git - vlc/blobdiff - include/vlc_sql.h
Use var_InheritString for --decklink-video-connection.
[vlc] / include / vlc_sql.h
index 3b123a94ab0d04756d77a4297f3b581ad597a54b..0fe4f4bcca3442cf5f5f8f5347c86448af17c32c 100644 (file)
@@ -110,7 +110,7 @@ struct sql_t
     int (*pf_commit) ( sql_t* );
 
     /** Rollback transaction */
-    int (*pf_rollback) ( sql_t* );
+    void (*pf_rollback) ( sql_t* );
 
     /** Create a statement object */
     sql_stmt_t* (*pf_prepare) ( sql_t* p_sql, const char* p_fmt,
@@ -136,6 +136,9 @@ struct sql_t
     /** Get the data from a specified column */
     int (*pf_getcolumn) ( sql_t* p_sql, sql_stmt_t* p_stmt, int i_col,
                           int type, sql_value_t *p_res );
+
+    /** Get column size of a specified column */
+    int (*pf_getcolumnsize) ( sql_t* p_sql, sql_stmt_t* p_stmt, int i_col );
 };
 
 /*****************************************************************************
@@ -295,9 +298,9 @@ static inline int sql_CommitTransaction( sql_t *p_sql )
  * @return VLC error code or success
  * @note This function is threadsafe
  **/
-static inline int sql_RollbackTransaction( sql_t *p_sql )
+static inline void sql_RollbackTransaction( sql_t *p_sql )
 {
-    return p_sql->pf_rollback( p_sql );
+    p_sql->pf_rollback( p_sql );
 }
 
 /**
@@ -557,6 +560,19 @@ static inline int sql_GetColumnBlob( sql_t* p_sql, sql_stmt_t* p_stmt,
     return i_ret;
 }
 
+/**
+ * @brief Get the size of the column in bytes
+ * @param p_sql The SQL object
+ * @param p_stmt The sql statement object
+ * @param i_col The column
+ * @return Size of the column in bytes, excluding the zero terminator
+ */
+static inline int sql_GetColumnSize( sql_t* p_sql, sql_stmt_t* p_stmt,
+        int i_col )
+{
+    return p_sql->pf_getcolumnsize( p_sql, p_stmt, i_col );
+}
+
 # ifdef __cplusplus
 }
 # endif /* C++ extern "C" */