MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NdbScanOperation.java
1 /*
2  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 /*
18  * NdbScanOperation.java
19  */
20 
21 package com.mysql.ndbjtie.ndbapi;
22 
23 import java.nio.ByteBuffer;
24 
25 import com.mysql.jtie.Wrapper;
26 import com.mysql.jtie.ArrayWrapper;
27 
28 public class NdbScanOperation extends NdbOperation implements NdbScanOperationConst
29 {
30  public final native NdbTransaction/*_NdbTransaction *_*/ getNdbTransaction() /*_const_*/;
31  public interface /*_enum_*/ ScanFlag
32  {
33  int SF_TupScan = 1<<16,
34  SF_DiskScan = 2<<16,
35  SF_OrderBy = 1<<24,
36  SF_Descending = 2<<24,
37  SF_ReadRangeNo = 4<<24,
38  SF_MultiRange = 8<<24,
39  SF_KeyInfo = 1;
40  }
41  public interface /*_struct_*/ ScanOptionsConst
42  {
43  long/*_Uint64_*/ optionsPresent();
44  public interface /*_enum_*/ Type
45  {
46  int SO_SCANFLAGS = 0x01,
47  SO_PARALLEL = 0x02,
48  SO_BATCH = 0x04,
49  SO_GETVALUE = 0x08,
50  SO_PARTITION_ID = 0x10,
51  SO_INTERPRETED = 0x20,
52  SO_CUSTOMDATA = 0x40;
53  }
54  int/*_Uint32_*/ scan_flags();
55  int/*_Uint32_*/ parallel();
56  int/*_Uint32_*/ batch();
57  NdbOperation.GetValueSpecArray/*_NdbOperation.GetValueSpec *_*/ extraGetValues();
58  int/*_Uint32_*/ numExtraGetValues();
59  int/*_Uint32_*/ partitionId();
60  NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ interpretedCode();
61  // MMM! support <out:BB> or check if needed: ByteBuffer/*_void *_*/ customData();
62  }
63  static public class /*_struct_*/ ScanOptions extends Wrapper implements ScanOptionsConst
64  {
65  public final native long/*_Uint64_*/ optionsPresent();
66  public final native int/*_Uint32_*/ scan_flags();
67  public final native int/*_Uint32_*/ parallel();
68  public final native int/*_Uint32_*/ batch();
69  public final native NdbOperation.GetValueSpecArray/*_NdbOperation.GetValueSpec *_*/ extraGetValues();
70  public final native int/*_Uint32_*/ numExtraGetValues();
71  public final native int/*_Uint32_*/ partitionId();
72  public final native NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ interpretedCode();
73  // MMM! support <out:BB> or check if needed: public final native ByteBuffer/*_void *_*/ customData();
74  public final native void optionsPresent(long/*_Uint64_*/ p0);
75  public final native void scan_flags(int/*_Uint32_*/ p0);
76  public final native void parallel(int/*_Uint32_*/ p0);
77  public final native void batch(int/*_Uint32_*/ p0);
78  public final native void extraGetValues(NdbOperation.GetValueSpecArray/*_NdbOperation.GetValueSpec *_*/ p0);
79  public final native void numExtraGetValues(int/*_Uint32_*/ p0);
80  public final native void partitionId(int/*_Uint32_*/ p0);
81  public final native void interpretedCode(NdbInterpretedCodeConst/*_const NdbInterpretedCode *_*/ p0);
82  // MMM! support <out:BB> or check if needed: public final native void customData(ByteBuffer/*_void *_*/ p0);
83  static public final native ScanOptions create();
84  static public final native void delete(ScanOptions p0);
85  }
86  public /*_virtual_*/ native int readTuples(int/*_LockMode_*/ lock_mode /*_= LM_Read_*/, int/*_Uint32_*/ scan_flags /*_= 0_*/, int/*_Uint32_*/ parallel /*_= 0_*/, int/*_Uint32_*/ batch /*_= 0_*/);
87  public final native int nextResult(boolean fetchAllowed /*_= true_*/, boolean forceSend /*_= false_*/);
88  // MMM! support <out:char *> or check if needed: public final native int nextResult(const char * * out_row_ptr, boolean fetchAllowed, boolean forceSend);
89  public final native void close(boolean forceSend /*_= false_*/, boolean releaseOp /*_= false_*/);
90  public final native NdbOperation/*_NdbOperation *_*/ lockCurrentTuple();
91  public final native NdbOperation/*_NdbOperation *_*/ lockCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ lockTrans);
92  public final native NdbOperation/*_NdbOperation *_*/ updateCurrentTuple();
93  public final native NdbOperation/*_NdbOperation *_*/ updateCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ updateTrans);
94  public final native int deleteCurrentTuple();
95  public final native int deleteCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ takeOverTransaction);
96  public final native NdbOperationConst/*_const NdbOperation *_*/ lockCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ takeOverTrans, NdbRecordConst/*_const NdbRecord *_*/ result_rec, ByteBuffer/*_char *_*/ result_row /*_= 0_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
97  public final native NdbOperationConst/*_const NdbOperation *_*/ updateCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ takeOverTrans, NdbRecordConst/*_const NdbRecord *_*/ attr_rec, String/*_const char *_*/ attr_row, byte[]/*_const unsigned char *_*/ mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
98  public final native NdbOperationConst/*_const NdbOperation *_*/ deleteCurrentTuple(NdbTransaction/*_NdbTransaction *_*/ takeOverTrans, NdbRecordConst/*_const NdbRecord *_*/ result_rec, ByteBuffer/*_char *_*/ result_row /*_= 0_*/, byte[]/*_const unsigned char *_*/ result_mask /*_= 0_*/, NdbOperation.OperationOptionsConst/*_const NdbOperation.OperationOptions *_*/ opts /*_= 0_*/, int/*_Uint32_*/ sizeOfOptions /*_= 0_*/);
99 }