Gda.Blob

Fields

Name

Type

Access

Description

data

Gda.Binary

r/w

data buffer, as a Gda.Binary

op

Gda.BlobOp

r/w

a pointer to a #GdaBlopOp, or None

Methods

class

copy (boxed)

class

free (boxed)

set_op (op)

to_string (maxlen)

Details

class Gda.Blob

Represents some binary data, accessed through a Gda.BlobOp object. op is generally set up by database providers when giving access to an existing BLOB in a database, but can be modified if needed using Gda.Blob.set_op().

classmethod copy(boxed)
Parameters:

boxed (object or None) – source to get a copy from.

Returns:

a newly allocated Gda.Blob which contains a copy of information in boxed.

Free-function: Gda.Blob.free

Return type:

object or None

Creates a new Gda.Blob structure from an existing one.

classmethod free(boxed)
Parameters:

boxed (object or None) – Gda.Blob to free.

Deallocates all memory associated to the given Gda.Blob.

set_op(op)
Parameters:

op (Gda.BlobOp or None) – a Gda.BlobOp object, or None

correctly assigns op to self

to_string(maxlen)
Parameters:

maxlen (int) – a maximum len used to truncate, or 0 for no maximum length

Returns:

a new string from self

Return type:

str

Converts all the non printable characters of blob->data into the \xxx representation where xxx is the octal representation of the byte, and the ‘\’ (backslash) character is converted to “\\”.