summaryrefslogtreecommitdiff
path: root/src/common/sql.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/sql.h')
-rw-r--r--src/common/sql.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/common/sql.h b/src/common/sql.h
index 1fb436853..f9593978c 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -2,13 +2,12 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef _COMMON_SQL_H_
-#define _COMMON_SQL_H_
+#ifndef COMMON_SQL_H
+#define COMMON_SQL_H
-#include "../common/cbasetypes.h"
#include <stdarg.h>// va_list
-
+#include "../common/cbasetypes.h"
// Return codes
#define SQL_ERROR (-1)
@@ -148,10 +147,10 @@ struct sql_interface {
///////////////////////////////////////////////////////////////////////////////
// Prepared Statements
///////////////////////////////////////////////////////////////////////////////
- // Parameters are placed in the statement by embedding question mark ('?')
+ // Parameters are placed in the statement by embedding question mark ('?')
// characters into the query at the appropriate positions.
// The markers are legal only in places where they represent data.
- // The markers cannot be inside quotes. Quotes will be added automatically
+ // The markers cannot be inside quotes. Quotes will be added automatically
// when they are required.
//
// example queries with parameters:
@@ -167,7 +166,7 @@ struct sql_interface {
/// It uses the connection of the parent Sql handle.
/// Queries in Sql and SqlStmt are independent and don't affect each other.
///
- /// @return SqlStmt handle or NULL if an error occured
+ /// @return SqlStmt handle or NULL if an error occurred
struct SqlStmt* (*StmtMalloc)(Sql* sql);
@@ -199,7 +198,7 @@ struct sql_interface {
/// Returns the number of parameters in the prepared statement.
///
- /// @return Number or paramenters
+ /// @return Number or parameters
size_t (*StmtNumParams)(SqlStmt* self);
@@ -237,8 +236,8 @@ struct sql_interface {
/// Binds the result of a column to a buffer.
/// The buffer will be filled with data when the next row is fetched.
- /// For string/enum buffer types there has to be enough space for the data
- /// and the nul-terminator (an extra byte).
+ /// For string/enum buffer types there has to be enough space for the data
+ /// and the null-terminator (an extra byte).
///
/// @return SQL_SUCCESS or SQL_ERROR
int (*StmtBindColumn)(SqlStmt* self, size_t idx, SqlDataType buffer_type, void* buffer, size_t buffer_len, uint32* out_length, int8* out_is_null);
@@ -292,4 +291,4 @@ void Sql_HerculesUpdateSkip(Sql* self,const char *filename);
void Sql_Init(void);
-#endif /* _COMMON_SQL_H_ */
+#endif /* COMMON_SQL_H */