Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mmt-errorView
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Maeder
mmt-errorView
Commits
43144571
Commit
43144571
authored
10 years ago
by
cmaeder
Browse files
Options
Downloads
Patches
Plain Diff
deleting entries for error and source files
parent
0f2b9e49
Branches
Branches containing commit
No related tags found
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/scala/DeleteRows.scala
+30
-0
30 additions, 0 deletions
src/main/scala/DeleteRows.scala
with
30 additions
and
0 deletions
src/main/scala/DeleteRows.scala
0 → 100644
+
30
−
0
View file @
43144571
package
info.kwarc.mmt.errorview
import
org.apache.camel.scala.dsl.builder.RouteBuilder
class
DeleteRows
extends
RouteBuilder
{
val
deleteRoute
=
"direct:deleteRow"
val
sourceDeleted
=
"direct:deleteSource"
def
deleteRows
(
f
:
String
)
:
Unit
=
{
getContext
.
createProducerTemplate
().
sendBody
(
deleteRoute
,
f
)
getContext
.
createProducerTemplate
().
sendBody
(
sourceDeleted
,
"%"
+
f
+
"%"
)
}
deleteRoute
-->
(
"db:DELETE FROM "
+
Table
.
name
+
" WHERE fileName=#"
)
sourceDeleted
-->
(
"db:DELETE FROM "
+
Table
.
name
+
" WHERE sourceRef LIKE #"
)
}
object
DeleteRows
{
def
main
(
args
:
scala.Array
[
String
])
:
Unit
=
{
val
(
context
,
filename
)
=
Table
.
initArgs
(
args
)
val
dbBuilder
=
new
DeleteRows
()
context
.
addRoutes
(
dbBuilder
)
context
.
start
()
dbBuilder
.
deleteRows
(
filename
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment