#2 Re: mORMot 1 » Javascript authentication » 2018-04-16 14:30:51

Hello, I would like to know how I can store the session key with javascript for use in future requests on a website.

#3 Re: mORMot 1 » [issue] mORMotWrappers.pas compilation error under Lazarus 1.9 trunk » 2018-04-11 11:28:08

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.

#4 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-19 13:45:49

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! big_smile

#5 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-16 13:50:54

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!

#6 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-16 13:37:03

polidados wrote:

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.

#7 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-16 13:34:04

ab wrote:

This is not what I meant.

Apologize me, now I understood. smile

ab wrote:

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.

ab wrote:

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. wink
The fields were created with the NOACCENTS collation.

#8 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-16 11:50:11

I implemented the Utf8SQLCompNoAccent() function, and I passed it by parameter to the create_collation(). Just this. hmm

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?

#9 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-16 10:41:13

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;

#10 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-15 10:28:46

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

#11 Re: mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-12 13:05:13

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.

#12 mORMot 1 » SYSTEMNOCASE accent insensitive » 2018-01-12 11:07:50

polidados
Replies: 16

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!

#13 Re: mORMot 1 » Out Of Memory due to huge out RawUTF8 parameter » 2017-09-08 11:34:43

Ok. I'll see what is best for my case based on your input.

Thank you, ab!

#14 mORMot 1 » Out Of Memory due to huge out RawUTF8 parameter » 2017-09-06 21:23:01

polidados
Replies: 2

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?

Board footer

Powered by FluxBB