You are not logged in.
Pages: 1
Thanks ab for the info.
Hello, I would like to know how I can store the session key with javascript for use in future requests on a website.
Hello!
[dcc32 Error] SynCommons.pas(62196): E2441 Inline function declared in interface section must not use local symbol 'COMPRESS_SYNLZ'
Same under Delphi Tokyo 10.2.
Hello ab!
After all, I decided to use the sqlite3.create_function, and override the like() function.
Now it's working fine.
Thank you very much!
I am using SQLiteStudio and SynDBExplorer. If I select using both of them it doesn't work, nor in my application.
But I did a test right now in my application and in SynDBExplorer. Using the "like" operator, the accent insensitive doesn't work. But using the "=" operator, it works!
I already did it. It's weird. Because it's being called in a few moments. But when I select or sort something, it's not being called.
I tried now with the others collations and it's happening with any collation function.
This is not what I meant.
Apologize me, now I understood.
Use the debugger to find out if the Utf8SQLCompNoAccent() function is actually called during process.
I already did it. It's weird. Because it's being called in a few moments. But when I select or sort something, it's not being called.
Also note that you need to delete the database first, so that CreateMissingTables() will properly initialize the table and its fields collation.
Yes, I was careful.
The fields were created with the NOACCENTS collation.
I implemented the Utf8SQLCompNoAccent() function, and I passed it by parameter to the create_collation(). Just this.
I searched in mORMot code for the usage of the Utf8SQLCompNoCase() function (for SYSTEMNOCASE collation).
And it was the same. I only found its implementation and where it's passed to the create_collation().
Then, should I call the Utf8SQLCompNoAccent() function from any other place?
Take a look at the partial code:
We have a descendant class of TSQLRestServerDB. Its declaration is the following:
TServerBD = class(TSQLRestServerDB)
private
FModel: TSQLModel;
{...}
public
constructor Create(const aDatabase: String; aUseAuthentication: Boolean = True);
{...}
end;
Now the Create() method implementation:
constructor TServerBD.Create(const aDatabase: String;
aUseAuthentication: Boolean);
begin
// Create the model
FModel := CreateModel;
// Call the ancestor constructor
inherited Create(FModel, aDatabase, aUseAuthentication);
// Create the NOACCENTS collation, using our function that replaces accented characters
// and after calls the UTF8ILComp() function
DB.SQLite3Library.create_collation(DB.DB, 'NOACCENTS', SQLITE_UTF8, nil, Utf8SQLCompNoAccent);
// Set the NOACCENTS collation for all RawUTF8 fields
FModel.SetCustomCollationForAll(sftUTF8Text, 'NOACCENTS');
// Create the missing tables in the database
CreateMissingTables(ExeVersion.Version.Version32, [itoNoAutoCreateUsers]);
{...}
end;
I'm sorry, but I already did it.
I created the NOACCENTS collation like SYSTEMNOCASE is.
I created a method to this collation that changes the accented characters and I set this collation for all UTF8 fields.
But it didn't work.
Filipe
Thank you for the quick answer.
Yeah, I tried right now. I created a new database with WIN32NOCASE and it didn't work too.
It also worked for case insensitive, but not for accent insensitive.
Hello,
I'm having an issue with SYSTEMNOCASE collation in SQLite.
I read the documentation and I searched the forum about it. In both cases I have found this collation is accent insensitive.
Unfortunatelly it's not working for me.
For example if I have records in the database with names JOAO, JOÃO, Joao and João and if I search JOAO, it retrieves me just JOAO and Joao. The records with accented names are not retrieved. This happens in my application, in SQLiteStudio and in SynDBExplorer.
Would I have to do something special to work the SYSTEMNOCASE accent insensitive?
Thanks!
Ok. I'll see what is best for my case based on your input.
Thank you, ab!
Hello!
In a method of an interface based service I get an 'Out of Memory' error when an out RawUTF8 parameter gets too large.
How can I tell the client that such error occurred? Because it happens after my method exited.
What is the proper size for such parameter to return?
Pages: 1