Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Keith Medcalf
lf Of Simon Slavin >Sent: Saturday, 15 February, 2020 13:56 >To: SQLite mailing list >Subject: Re: [sqlite] Searching by Guid index in table (.NET)? I can >write and read, but not search by the Guid > >On 15 Feb 2020, at 8:12pm, J Decker wrote: > >> memcmp is harder than strcmp?

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Simon Slavin
On 15 Feb 2020, at 8:12pm, J Decker wrote: > memcmp is harder than strcmp? > and with blob I suppose you don't have 'if UTF8 or UTF16 do > different things' so should compare slightly faster? It's not cut-and-dried, but you can take things into consideration. Once data is in a database it usual

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread J Decker
On Fri, Feb 14, 2020 at 7:36 AM Simon Slavin wrote: > On 14 Feb 2020, at 2:59pm, Andy KU7T wrote: > > > Do you suggest me keeping storing TEXT (and declaring the column as TEXT > instead of GUID) or storing and declaring BLOB (and remove HEX)? > > TEXT. Makes sorting and searching easier. > me

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-15 Thread Barry Smith
Regardless of whether you decide to store GUIDs as text or binary, things will be easier if you set your connection string appropriately. BinaryGUID is the parameter you want to change. See https://www.connectionstrings.com/sqlite-net-provider/store-guid-as-text/ For performance binary is bett

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Simon Slavin
On 14 Feb 2020, at 2:59pm, Andy KU7T wrote: > Do you suggest me keeping storing TEXT (and declaring the column as TEXT > instead of GUID) or storing and declaring BLOB (and remove HEX)? TEXT. Makes sorting and searching easier. ___ sqlite-users maili

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
rching by Guid index in table (.NET)? I can write and read, but not search by the Guid In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you shou

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Radovan Antloga
In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you should use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09, A

Re: [sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread radovan5
In SQLite type guid does not exist. Look at this documentation: https://www.sqlite.org/datatype3.html Affinity for guid would be BLOB but in trigger you store TEXT. I do not use .NET but I think you should use different parameter type. I would use TEXT type. Regards R.A. On 14.02.2020 15:09, An

[sqlite] Searching by Guid index in table (.NET)? I can write and read, but not search by the Guid

2020-02-14 Thread Andy KU7T
Hi, I am having trouble searching for a Guid. I think some conversion is missing. I wonder if someone can point me to the error… Column: [ID] GUID(16) Index: CREATE UNIQUE INDEX [ID_INDEX] ON [DXLOG]([ID] COLLATE [BINARY] ASC); Trigger: CREATE TRIGGER [AUTOGENERATE_ID] AFTER INSERT ON [DXLOG] F