Closed agavrel closed 4 years ago
What's the SQL type of pdfs.id
?
What's the exception you are getting?
pdfs.id is of type varchar(32) I do not get any exception, would you mind providing a code snippet with my code to get the Exception?
I use
GetPdfFromPsqlDB(id).catchError((e) {
print("Got error: ${e.error}");
but nothing is displayed
I do not get any exception
In that case what's the issue? You don't get any result back?
no there is definitely some error because the print statement that follow my query is not executed
I added
print('succesfully retrieved data');
right after the request
Just to test the connection is open, execute the following statement right after open:
final rs = await connection.query("SELECT 1");
print('got: $rs');
also add a small, 5-seconds timeout to the query, just in case...
Ok thank you very much, I was able to fix it thanks to your hints (was calling the wrong db_name and using encode(pdf, 'hex') while data was already in bytes)
I am wondering what I didn't get right (I query a database with id as a string and a Bytea as the value associated with the id
results[0][1] is a unique result with bytearray value.
This function is not working and I did not figure out why. Are Uint8List and ByteA compatible? Is it because id is a String and not an int ?
Any help strongly appreciated!!