]> git.sesse.net Git - vlc/blobdiff - include/vlc_sql.h
Contribs: use XulRunner 1.9.2 on Win32
[vlc] / include / vlc_sql.h
index ad325f5d14810fb12823a4af2acb3c4ad8ac212e..ef4ebca93b9592da6ce94756adbe5020963338df 100644 (file)
@@ -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 );
 };
 
 /*****************************************************************************
@@ -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" */