You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 24, 2022. It is now read-only.
OrmLite also supports providing collection of values which is automatically split into multiple DB parameters to simplify executing parameterized SQL with multiple IN Values, e.g:
@@ -875,6 +895,17 @@ var names = new List<string>{ "foo", "bar", "qux" };
875
895
varresults=db.SqlList<Table>("SELECT * FROM Table WHERE Name IN (@names)", new { names });
876
896
```
877
897
898
+
### Custom SQL using PostgreSQL Arrays
899
+
900
+
If using PostgreSQL you can take advantage of its complex Array Types and utilize its [Array Functions and Operators](https://www.postgresql.org/docs/9.6/functions-array.html), e.g:
901
+
902
+
```csharp
903
+
varids=new[]{ 1, 2, 3};
904
+
varq=Db.From<Table>()
905
+
.And("ARRAY[{0}] && ref_ids", ids.Join(","))
906
+
varresults=db.Select(q);
907
+
```
908
+
878
909
### Lazy Queries
879
910
880
911
API's ending with `Lazy` yield an IEnumerable sequence letting you stream the results without having to map the entire resultset into a disconnected List of POCO's first, e.g:
@@ -1634,17 +1665,6 @@ var q = db.From<Table>()
1634
1665
varresults=db.Select(q);
1635
1666
```
1636
1667
1637
-
## Nested Typed Sub SqlExpressions
1638
-
1639
-
The `Sql.In()` API supports nesting and combining of multiple Typed SQL Expressions together
0 commit comments