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

Method DsqlBatch

src/dsql/DsqlBatch.cpp:63–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63DsqlBatch::DsqlBatch(DsqlDmlRequest* req, const dsql_msg* /*message*/, IMessageMetadata* inMeta, ClumpletReader& pb)
64 : m_dsqlRequest(req),
65 m_batch(NULL),
66 m_meta(inMeta),
67 m_messages(m_dsqlRequest->getPool()),
68 m_blobs(m_dsqlRequest->getPool()),
69 m_blobMap(m_dsqlRequest->getPool()),
70 m_blobMeta(m_dsqlRequest->getPool()),
71 m_defaultBpb(m_dsqlRequest->getPool()),
72 m_messageSize(0),
73 m_alignedMessage(0),
74 m_alignment(0),
75 m_flags(0),
76 m_detailed(DETAILED_LIMIT),
77 m_bufferSize(BUFFER_LIMIT),
78 m_lastBlob(MAX_ULONG),
79 m_setBlobSize(false),
80 m_blobPolicy(IBatch::BLOB_NONE)
81{
82 memset(&m_genId, 0, sizeof(m_genId));
83
84 FbLocalStatus st;
85 m_messageSize = m_meta->getMessageLength(&st);
86 m_alignedMessage = m_meta->getAlignedLength(&st);
87 m_alignment = m_meta->getAlignment(&st);
88 check(&st);
89
90 for (pb.rewind(); !pb.isEof(); pb.moveNext())
91 {
92 UCHAR t = pb.getClumpTag();
93
94 switch (t)
95 {
96 case IBatch::TAG_MULTIERROR:
97 case IBatch::TAG_RECORD_COUNTS:
98 setFlag(t, pb.getInt());
99 break;
100
101 case IBatch::TAG_BLOB_POLICY:
102 m_blobPolicy = pb.getInt();
103
104 switch (m_blobPolicy)
105 {
106 case IBatch::BLOB_ID_ENGINE:
107 case IBatch::BLOB_ID_USER:
108 case IBatch::BLOB_STREAM:
109 break;
110 default:
111 m_blobPolicy = IBatch::BLOB_NONE;
112 break;
113 }
114
115 break;
116
117 case IBatch::TAG_DETAILED_ERRORS:
118 m_detailed = pb.getInt();
119 if (m_detailed > DETAILED_LIMIT * 4)
120 m_detailed = DETAILED_LIMIT * 4;

Callers

nothing calls this directly

Calls 15

getClumpTagMethod · 0.80
setBufMethod · 0.80
registerBatchMethod · 0.80
checkFunction · 0.50
getMessageLengthMethod · 0.45
getAlignedLengthMethod · 0.45
getAlignmentMethod · 0.45
rewindMethod · 0.45
isEofMethod · 0.45
moveNextMethod · 0.45
getIntMethod · 0.45
getCountMethod · 0.45

Tested by

no test coverage detected