diff --git a/README.md b/README.md index f717a96..ef05307 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,23 @@ await connection.transaction((ctx) async { }); ``` +Execute query to retrieve ByteArray type: + +```dart +import 'dart:typed_data'; // required for Uint8List + +Future> GetByteArray(final int Id) async { + var connection = new PostgreSQLConnection(...); // replace with your credentials + await connection.open(); + var sqlQuery = "SELECT data FROM table WHERE id = @Id"; + List results = await connection.query(sqlQuery, substitutionValues: { + "Id" : id + }); + + return results; +} +``` + See the API documentation: https://www.dartdocs.org/documentation/postgres/latest. ## Development branch