Skip to content

Commit

Permalink
Corrected typos.
Browse files Browse the repository at this point in the history
  • Loading branch information
gvasquezvargas authored Nov 12, 2024
1 parent a33f6ad commit 12754f1
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,32 @@ EDB Postgres Advanced Server supports nested table collection types created with

Nested table types are mapped to `List<object>`s in C#, as it is preferred over `ArrayList`. These lists contain as many elements as the nested table type’s rows. The nested table items are translated to be compatible with the C# application using the following rules:

- The connector resolves all elements of a nested table into `List<object>` elements of a single object type, making the element types are consistent in C#.
- The connector resolves all elements of a nested table into `List<object>` elements of a single object type, making the element types consistent in C#.

- If the nested type `IS TABLE OF` a domain type (int, varchar, decimal, etc.): all the elements will be their C# counterpart according to the [Supported Types and their Mappings](https://www.npgsql.org/doc/types/basic.html#read-mappings).
- If the nested type `IS TABLE OF` a domain type (int, varchar, decimal, etc.), all the elements will be their C# counterpart according to the [Supported Types and their Mappings](https://www.npgsql.org/doc/types/basic.html#read-mappings).

- If the nested type `IS TABLE OF` a record or composite type **not mapped** to a C# class: all elements will be a `List<object>` containing as many elements as the record or composite fields, with proper type translation.
- If the nested type `IS TABLE OF` a record or composite type **not mapped** to a C# class, all elements will be a `List<object>` containing as many elements as the record or composite fields, with proper type translation.

- If the nested type `IS TABLE OF` a record or composite type **mapped** to a C# class (for example, `MyComposite`): all elements will be `MyComposite` instances.
- If the nested type `IS TABLE OF` a record or composite type **mapped** to a C# class (for example, `MyComposite`), all elements will be `MyComposite` instances.

## Example: Retrieving nested table output parameter

This program:

- Creates a package with a nested `emp_tbl_typ` table type of `emp_rec_typ`. This packages has a stored procedure that fills the nested table output parameter.
- Creates a package with a nested `emp_tbl_typ` table type of `emp_rec_typ`. This package has a stored procedure that fills the nested table output parameter.

- Maps the nested table type to a C# class via `MapComposite<>`.

- Executes and displays the results.

Create an empty console program and paste the following code.

!!!note
Always provide type names in lower case.
Always provide type names in lowercase.
!!!

### Program example

Create an empty console program and paste the following code.

```text
internal static class Program
{
Expand Down Expand Up @@ -173,4 +175,4 @@ Employee 7788: SCOTT
Employee 7839: KING
Employee 7844: TURNER
Employee 7876: ADAMS
```
```

0 comments on commit 12754f1

Please sign in to comment.