Struct oracle::Collection [] [src]

pub struct Collection { /* fields omitted */ }

Oracle-specific collection data type

This type corresponds to varray and nested table data types. See Oracle manual.

let conn = Connection::connect("scott", "tiger", "", &[])?;

// MDSYS.SDO_ELEM_INFO_ARRAY is defined as VARRAY (1048576) of NUMBER.
let objtype = conn.object_type("MDSYS.SDO_ELEM_INFO_ARRAY")?;

// Create a new collection
let mut obj = objtype.new_collection()?;
obj.push(&1);
obj.push(&3);
assert_eq!(obj.to_string(), "MDSYS.SDO_ELEM_INFO_ARRAY(1, 3)");

Note: Methods in the type may be changed in future.

Methods

impl Collection
[src]

[src]

Returns type information.

[src]

Returns the number of elements.

This counts also deleted elements. See "Comments" about OCICollSize().

[src]

Returns the first index.

Use this method if indexes of the collection isn't continuous.

[src]

Returns the last index.

Use this method if indexes of the collection isn't continuous.

[src]

Returns the next index following the specified index.

Use this method if indexes of the collection isn't continuous.

[src]

Returns the previous index following the specified index.

Use this method if indexes of the collection isn't continuous.

[src]

Returns whether an element exists at the specified index.

[src]

Returns the value of the element at the specified index.

[src]

Sets the value to the element at the specified index.

[src]

Appends an element to the end of the collection.

[src]

Remove the element at the specified index. Note that the position ordinals of the remaining elements are not changed. The operation creates holes in the collection.

[src]

Trims a number of elements from the end of a collection.

If the number of of elements to trim exceeds the current size of the collection an error is returned.

Trait Implementations

impl Clone for Collection
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for Collection
[src]

[src]

Executes the destructor for this type. Read more

impl FromSql for Collection
[src]

impl ToSql for Collection
[src]

[src]

[src]

impl Display for Collection
[src]

[src]

Formats the value using the given formatter. Read more

impl Debug for Collection
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl !Send for Collection

impl !Sync for Collection