use of org.dbflute.logic.jdbc.metadata.info.DfProcedureSourceInfo in project dbflute-core by dbflute.
the class DfProcedureSupplementExtractorPostgreSQL method doExtractProcedureSourceInfo.
// ===================================================================================
// Source Info
// ===========
@Override
protected Map<String, DfProcedureSourceInfo> doExtractProcedureSourceInfo(UnifiedSchema unifiedSchema) {
final List<Map<String, String>> sourceList = selectProcedureSourceList(unifiedSchema);
final Map<String, DfProcedureSourceInfo> resultMap = StringKeyMap.createAsFlexibleOrdered();
for (Map<String, String> sourceMap : sourceList) {
final String name = sourceMap.get("routine_name");
if (name == null) {
// just in case
continue;
}
final DfProcedureSourceInfo sourceInfo = new DfProcedureSourceInfo();
// 'routine_definition' has body part only
// it uses same way as MySQL about parameter info for simple
final String body = sourceMap.get("routine_definition");
if (body == null) {
continue;
}
sourceInfo.setSourceCode(body);
// body part only
sourceInfo.setSourceLine(calculateSourceLine(body));
sourceInfo.setSourceSize(calculateSourceSize(body));
resultMap.put(name, sourceInfo);
}
return resultMap;
}
use of org.dbflute.logic.jdbc.metadata.info.DfProcedureSourceInfo in project dbflute-core by dbflute.
the class DfProcedureSupplementExtractorDB2 method doExtractProcedureSourceInfo.
// ===================================================================================
// Source Info
// ===========
@Override
protected Map<String, DfProcedureSourceInfo> doExtractProcedureSourceInfo(UnifiedSchema unifiedSchema) {
final List<Map<String, String>> sourceList = selectProcedureSourceList(unifiedSchema);
final Map<String, DfProcedureSourceInfo> resultMap = StringKeyMap.createAsFlexibleOrdered();
for (Map<String, String> sourceMap : sourceList) {
final String name = sourceMap.get("ROUTINENAME");
if (name == null) {
// just in case
continue;
}
final DfProcedureSourceInfo sourceInfo = new DfProcedureSourceInfo();
// full text (null allowed)
final String body = sourceMap.get("TEXT");
if (body == null) {
continue;
}
sourceInfo.setSourceCode(body);
sourceInfo.setSourceLine(calculateSourceLine(body));
sourceInfo.setSourceSize(calculateSourceSize(body));
resultMap.put(name, sourceInfo);
}
return resultMap;
}
Aggregations