forked from WiseLibs/better-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joshua Wise
committed
Sep 1, 2016
1 parent
41eacfd
commit d819cea
Showing
9 changed files
with
74 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
// Given the name of a named parameter, returns the index of the parameter. | ||
// If the named parameter does not exist, 0 is returned. | ||
|
||
int Binder::GetNamedParameterIndex(const char* string, int length) { | ||
unsigned int Binder::GetNamedParameterIndex(const char* string, int length) { | ||
int index; | ||
char temp[length + 2]; | ||
strlcpy(temp + 1, string, length + 1); | ||
|
||
temp[0] = '@'; | ||
index = sqlite3_bind_parameter_index(handle, temp); | ||
if (index) { | ||
return index; | ||
return (unsigned int)index; | ||
} | ||
|
||
temp[0] = ':'; | ||
index = sqlite3_bind_parameter_index(handle, temp); | ||
if (index) { | ||
return index; | ||
return (unsigned int)index; | ||
} | ||
|
||
temp[0] = '$'; | ||
index = sqlite3_bind_parameter_index(handle, temp); | ||
if (index) { | ||
return index; | ||
} | ||
|
||
return index; | ||
return (unsigned int)index; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters