Lines 74-81
Link Here
|
74 |
return new AddNodeRequest(nodeId, callerId, funcId, offset, lineNumber); |
74 |
return new AddNodeRequest(nodeId, callerId, funcId, offset, lineNumber); |
75 |
} |
75 |
} |
76 |
|
76 |
|
77 |
public AddFunctionRequest addFunction(Long funcId, String funcName, int source_file_index, int line_number) { |
77 |
public AddFunctionRequest addFunction(Long funcId, String funcName, int source_file_index, int line_number, long context_id) { |
78 |
return new AddFunctionRequest(funcId, funcName, source_file_index, line_number); |
78 |
return new AddFunctionRequest(funcId, funcName, source_file_index, line_number, context_id); |
79 |
} |
79 |
} |
80 |
|
80 |
|
81 |
public SQLRequest updateNodeMetrics(long id, long bucket) { |
81 |
public SQLRequest updateNodeMetrics(long id, long bucket) { |
Lines 127-150
Link Here
|
127 |
public final CharSequence name; |
127 |
public final CharSequence name; |
128 |
public final int sourceFileIndex; |
128 |
public final int sourceFileIndex; |
129 |
public final int line_number; |
129 |
public final int line_number; |
|
|
130 |
public final long context_id; |
130 |
|
131 |
|
131 |
public AddFunctionRequest(long id, CharSequence name, int sourceFileIndex, int line_number) { |
132 |
public AddFunctionRequest(long id, CharSequence name, int sourceFileIndex, int line_number, long context_id) { |
132 |
this.id = id; |
133 |
this.id = id; |
133 |
this.name = name; |
134 |
this.name = name; |
134 |
this.sourceFileIndex = sourceFileIndex; |
135 |
this.sourceFileIndex = sourceFileIndex; |
135 |
this.line_number = line_number; |
136 |
this.line_number = line_number; |
|
|
137 |
this.context_id = context_id; |
136 |
} |
138 |
} |
137 |
|
139 |
|
138 |
@Override |
140 |
@Override |
139 |
public void execute() throws SQLException { |
141 |
public void execute() throws SQLException { |
140 |
PreparedStatement stmt = cache.getPreparedStatement( |
142 |
PreparedStatement stmt = cache.getPreparedStatement( |
141 |
"INSERT INTO Func " + // NOI18N |
143 |
"INSERT INTO Func " + // NOI18N |
142 |
"(func_id, func_name, func_source_file_id, line_number) " + // NOI18N |
144 |
"(func_id, func_name, func_source_file_id, line_number, context_id) " + // NOI18N |
143 |
"VALUES (?, ?, ?, ?)"); // NOI18N |
145 |
"VALUES (?, ?, ?, ?, ?)"); // NOI18N |
144 |
stmt.setLong(1, id); |
146 |
stmt.setLong(1, id); |
145 |
stmt.setString(2, truncateString(name.toString())); |
147 |
stmt.setString(2, truncateString(name.toString())); |
146 |
stmt.setInt(3, sourceFileIndex); |
148 |
stmt.setInt(3, sourceFileIndex); |
147 |
stmt.setLong(4, line_number); |
149 |
stmt.setLong(4, line_number); |
|
|
150 |
stmt.setLong(5, context_id); |
148 |
stmt.executeUpdate(); |
151 |
stmt.executeUpdate(); |
149 |
} |
152 |
} |
150 |
} |
153 |
} |