question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Querying a column of Guid type

See original GitHub issue

Which service(blob, file, queue, table) does this issue concern?

Table

Which version of the Azurite was used?

3.17.1

Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)

npm

What’s the Node.js version?

14.4.0

What problem was encountered?

When querying for a record with a column of Guid type w/o specifying the keyword guid in front of the value, Azurite returns the record where the real Storage Table would not.

Steps to reproduce the issue?

Step 1

Create a table with a custom column named InstructionId with Guid values in it. image

Step 2

Write a value of a Guid type into the table image

Step 3

Query for the item using the PartitionKey and the column value w/o using the guid keyword.

Guid instructionId = someGuidValue;
var pages = client.QueryAsync<TableEntity>($"PartitionKey eq '{userIdDeviceIdCompositeKey}' and InstructionId eq '{instructionId}'", maxPerPage: 1);

Assuming the table contains the record, Azurite will return it. The real storage account will not. To make it work with the real storage account, the following query must be used:

Guid instructionId = someGuidValue;
var pages = client.QueryAsync<TableEntity>($"PartitionKey eq '{userIdDeviceIdCompositeKey}' and InstructionId eq guid'{instructionId}'", maxPerPage: 1);

Note the InstructionId eq guid'{instructionId}'

Have you found a mitigation/solution?

No

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
edwin-hubercommented, May 22, 2022

Thanks for raising this. Agreed, we are aiming for service behaviors rather than documented behavior. I am working on several related issues to entity types and querying. I shall roll this up into that work.

0reactions
edwin-hubercommented, Dec 23, 2022

@blueww & @XiaoningLiu approved changes are checked into main, can you help with flagging this for a milestone / release? Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding the GUID data type in SQL Server
GUID is a 16 byte binary SQL Server data type that is globally unique across tables, databases, and servers. The term GUID stands...
Read more >
uniqueidentifier (Transact-SQL) - SQL Server - Microsoft Learn
A column or local variable of uniqueidentifier data type can be initialized to a value in the following ways:.
Read more >
An Essential Guide To SQL Server GUID By Examples
In SQL Server, the UNIQUEIDENTIFIER data type holds GUID values. The following statements declare a variable with type UNIQUEIDENTIFIER and assign it a...
Read more >
How to check if a value in a column is GUID in sql server?
I found a way to check it: SELECT 1 WHERE @StringToCompare LIKE REPLACE('00000000-0000-0000-0000-000000000000', '0', '[0-9a-fA-F]');.
Read more >
Inserting a value into a global ID or GUID column in SQL ...
If you use SQL to insert records to a table that contains a global ID or GUID column, you must populate the column...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found