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.

postgres Array queries do not seem to be supported!

See original GitHub issue
[Table(Name = "dd")]
public partial class dd
{
        [Column(Name = "dd", DataType = DataType.VarChar, Length = 255)]
        public System.String[] source { get; set; }
}

using (var con = DB.GetConnection())
 {
      var sql = con.Entity.dd.Where(c => c.source.Contains("2"));
      var data2 = sql.ToList();
}

throw: LinqToDB.Linq.LinqException:“‘c.source.Contains(“2”)’ cannot be converted to SQL.”

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:22 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
MaceWinducommented, Apr 16, 2021

Can confirm that with efcore involved it doesn’t work. looking into it

0reactions
Evengardcommented, Apr 16, 2021

The workaround didn’t work, now I am getting ‘Cannot convert value of type System.Byte[][] to SQL’

Read more comments on GitHub >

github_iconTop Results From Across the Web

JPA Native Query doesn't seem to support PostgreSQL ...
My query is: SELECT id FROM person WHERE authority_right = ARRAY[1,2]. authority_right is integer array. My goal is to find people who have ......
Read more >
PostgreSQL: Documentation: 15: 8.15. Arrays
PostgreSQL allows columns of a table to be defined as variable-length multidimensional arrays. Arrays of any built-in or user-defined base type, enum type, ......
Read more >
PostgreSQL NOT IN array slow query
I have a large table with millions of rows. Each row has an array field tags . I also have the proper GIN...
Read more >
PostgreSQL Unnest Function: Syntax & Essential Queries
The PostgreSQL unnest() function allows you to expand one array at a time and also expand many arrays (of potentially different data types)...
Read more >
PostgreSQL limitations when working with big data and ...
PostgreSQL GIN indexes don't support index-only scans. Look at this query plan: EXPLAIN ANALYZE SELECT COUNT(*) FROM “notifications” WHERE ...
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