Sha256: 4f65b076b65879418af5b8e1276ba5539d43989225bbb7ebaca92dfbe39e1adb

Contents?: true

Size: 1.25 KB

Versions: 23

Compression:

Stored size: 1.25 KB

Contents

package org.embulk.output.oracle.oci;

import jnr.ffi.Pointer;
import jnr.ffi.types.u_int16_t;
import jnr.ffi.types.u_int32_t;

public class PrimitiveBulkOCI implements BulkOCI {

    private final OCI oci;


    public PrimitiveBulkOCI(OCI oci)
    {
        this.oci = oci;
    }

    public short embulk_output_oracle_OCIDirPathColArrayEntriesSet(
            Pointer dpca,
            Pointer errhp,
            @u_int16_t short columnCount,
            @u_int32_t int rowCount,
            Pointer data,
            Pointer sizes) {

        int index = 0;
        long offset = 0;
        for (int row = 0; row < rowCount; row++) {
            for (short column = 0; column < columnCount; column++) {
                short size = sizes.getShort(index++ * 2);
                short result = oci.OCIDirPathColArrayEntrySet(
                        dpca,
                        errhp,
                        row,
                        column,
                        data.slice(offset),
                        size,
                        OCI.OCI_DIRPATH_COL_COMPLETE);
                if (result != OCI.OCI_SUCCESS) {
                    return result;
                }
                offset += size;
            }
        }

        return OCI.OCI_SUCCESS;
    }
}

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
embulk-output-oracle-0.7.0 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.6.5 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.6.4 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java