MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / Batch

Method Batch

src/remote/client/interface.cpp:2754–2824  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2752
2753
2754Batch::Batch(Statement* s, IMessageMetadata* inFmt, unsigned parLength, const unsigned char* par)
2755 : messageStream(0), blobStream(nullptr), sizePointer(nullptr),
2756 messageSize(0), alignedSize(0), blobBufferSize(0), messageBufferSize(0), flags(0),
2757 stmt(s), format(inFmt), blobAlign(0), blobPolicy(BLOB_NONE),
2758 segmented(false), defSegmented(false), batchActive(false),
2759 messageCount(0), blobCount(0), serverSize(0), blobHeadSize(0),
2760 tmpStatement(false)
2761{
2762 LocalStatus ls;
2763 CheckStatusWrapper st(&ls);
2764
2765 messageSize = format->getMessageLength(&st);
2766 check(&st);
2767 alignedSize = format->getAlignedLength(&st);
2768 check(&st);
2769
2770 memset(&genId, 0, sizeof(genId));
2771
2772 ClumpletReader rdr(ClumpletReader::WideTagged, par, parLength);
2773
2774 for (rdr.rewind(); !rdr.isEof(); rdr.moveNext())
2775 {
2776 UCHAR t = rdr.getClumpTag();
2777
2778 switch (t)
2779 {
2780 case TAG_MULTIERROR:
2781 case TAG_RECORD_COUNTS:
2782 if (rdr.getInt())
2783 flags |= (1 << t);
2784 else
2785 flags &= ~(1 << t);
2786 break;
2787
2788 case TAG_BLOB_POLICY:
2789 blobPolicy = rdr.getInt();
2790
2791 switch (blobPolicy)
2792 {
2793 case BLOB_ID_ENGINE:
2794 case BLOB_ID_USER:
2795 case BLOB_STREAM:
2796 break;
2797 default:
2798 blobPolicy = BLOB_NONE;
2799 break;
2800 }
2801
2802 break;
2803 }
2804 }
2805 s->getStatement()->rsr_batch_flags = flags;
2806
2807 // allocate buffers
2808 Rsr* statement = stmt->getStatement();
2809 CHECK_HANDLE(statement, isc_bad_req_handle);
2810 Rdb* rdb = statement->rsr_rdb;
2811 CHECK_HANDLE(rdb, isc_bad_db_handle);

Callers

nothing calls this directly

Calls 12

CHECK_HANDLEFunction · 0.85
getClumpTagMethod · 0.80
getPortConfigMethod · 0.80
checkFunction · 0.50
getMessageLengthMethod · 0.45
getAlignedLengthMethod · 0.45
rewindMethod · 0.45
isEofMethod · 0.45
moveNextMethod · 0.45
getIntMethod · 0.45
getStatementMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected