import method

int import(
  1. int oid,
  2. String filename, {
  3. Allocator allocator = malloc,
})

Imports a local file into a large object and returns its id

Implementation

int import(int oid, String filename, {Allocator allocator = malloc}) {
  int id = psql.pq.lo_import(psql.conn,
      filename.asCharP(allocator: allocator, encoding: psql.encoding));
  if (id < 0) throw LibPqException(psql.lastErrorMessage);

  return id;
}