Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » [SQLITE] Search accents insensitive (How to select records without sensivity to the case and accents ?)
Re: [SQLITE] Search accents insensitive [message #48391 is a reply to message #48198] Thu, 29 June 2017 15:11 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

I'm trying to do it with dolik.rce explanations and sample, but I get this error :
/home/joseph/uppMyApps/Owl/main.cpp (432): error: invalid conversion from 'void*' to 'void (*)(sqlite3_context*, int, sqlite3_value**) {aka void (*)(sqlite3_context*, int, Mem**)}' [-fpermissive]

/home/joseph/upp/uppsrc/plugin/sqlite3/lib/sqlite3.h (4487): note:   initializing argument 6 of 'int sqlite3_create_function(sqlite3*, const char*, int, int, void*, void (*)(sqlite3_context*, int, sqlite3_value**), void (*)(sqlite3_context*, int, sqlite3_value**), void (*)(sqlite3_context*))'


I'm surely missing something, but I don't understand what...

Maybe the sSqlite pointer used in dolik.rce's sqlite_md5 function ? I don't understand where it comes from and how to declare/initialise it... So, I omited it in my own code, and the compiler does not complains...

Here are the most interesting parts of my code :

extern "C" {
	void Sqlite3NoAccents(sqlite3_context *context, int argc, sqlite3_value **argv) {
		String str = RemoveAccents((const char*)sqlite3_value_text(argv[0]));
		sqlite3_result_text(context, ~str, str.GetCount(), SQLITE_TRANSIENT);
		return;
	}
}

Sqlite3Session sqlite3;
::sqlite3* sqlite3db = (::sqlite3*)(Sqlite3Session::sqlite3*)sqlite3;
sqlite3_create_function(sqlite3db, "NoAccents", 1, SQLITE_ANY, 0, (void *)Sqlite3NoAccents, 0, 0);

(RemoveAccents() is from Koldo's Functions4U)

Any help ?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Please Help Me
Next Topic: Oracle 12c
Goto Forum:
  


Current Time: Sun Apr 28 11:41:36 CEST 2024

Total time taken to generate the page: 0.03093 seconds