dbd/common.c

changeset 28
44b1d78b50f5
parent 17
21c4feaeafe7
child 31
999ef93f0dbc
--- a/dbd/common.c	Mon Dec 22 07:52:04 2008 +0000
+++ b/dbd/common.c	Fri Feb 13 04:07:11 2009 +0000
@@ -12,8 +12,8 @@
 }
 
 /*
- * replace '?' placeholders with $\d+ placeholders
- * to be compatible with PSQL API
+ * replace '?' placeholders with {native_prefix}\d+ placeholders
+ * to be compatible with native API
  */
 char *replace_placeholders(lua_State *L, char native_prefix, const char *sql) {
     size_t len = strlen(sql);
@@ -76,7 +76,7 @@
 	    size_t n;
 
 	    if (ph_num > MAX_PLACEHOLDERS) {
-		luaL_error(L, "Sorry, you are using more than %d placeholders. Use ${num} format instead", MAX_PLACEHOLDERS);
+		luaL_error(L, "Sorry, you are using more than %d placeholders. Use %c{num} format instead", MAX_PLACEHOLDERS, native_prefix);
 	    }
 
 	    n = snprintf(&newsql[newpos], MAX_PLACEHOLDER_SIZE, format_str, ph_num++);

mercurial