write method

int write(
  1. Uint8List data,
  2. int length, {
  3. Allocator allocator = malloc,
})

Write data to the large object

Implementation

int write(Uint8List data, int length, {Allocator allocator = malloc}) {
  Pointer<Char> buf = allocator<Char>(length);
  for (int i = 0; i < length; i++) {
    buf[i] = data[i];
  }
  final result = psql.pq.lo_write(psql.conn, fd, buf, length);
  allocator.free(buf);
  return result;
}