]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.db/scl/Simantics/DBSupport.scl
Defined L0.ValueType to make L0.Value(s) searchable from index
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / DBSupport.scl
1 import "UI/Progress"
2 import "Simantics/DB"
3
4 importJava "org.simantics.db.common.utils.CommonDBUtils" where
5
6     listClusters :: <ReadGraph> [ClusterUID]
7     resourcesByCluster :: ClusterUID -> <ReadGraph> [Resource]
8     directStatements :: Resource -> Boolean -> <ReadGraph> [Statement]
9     garbageResources :: <ReadGraph> [Resource]
10     clusterUIDOfResource :: Resource -> <ReadGraph> ClusterUID
11     isClusterLoaded :: ClusterUID -> <ReadGraph> Boolean
12
13 importJava "org.simantics.scl.db.SCLFunctions" where
14     collectClusters :: <Proc> ()
15     countQueries :: <ReadGraph> Integer
16     """
17     restrictQueries amount step maxTimeInMs
18     
19     Collects some DB queries. Tries to reach at maximum 'amount' queries.
20     Uses at maximum 'maxTimeInMs' milliseconds in 'step' millisecond stints.
21     """
22     restrictQueries :: Integer -> Integer -> Integer -> <ReadGraph> ()
23
24 importJava "org.simantics.db.layer0.util.Layer0Utils" where
25     @JavaName emptyTrashBin
26     emptyTrashBinWithMonitor :: ProgressMonitor -> <Proc> ()
27
28 //emptyTrashBin :: <Proc> ()
29 emptyTrashBin = emptyTrashBinWithMonitor $ createNullProgressMonitor ()
30
31 importJava "org.simantics.db.service.ClusterUID" where
32     data ClusterUID