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.8.7 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.6 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.5 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.4 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.3 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.2 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.1 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.8.0 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.13 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.12 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.11 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.10 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.9 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.8 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.7 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.6 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.5 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.3 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.2 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java
embulk-output-oracle-0.7.1 src/main/java/org/embulk/output/oracle/oci/PrimitiveBulkOCI.java