X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.db%2Fscl%2FSimantics%2FDBSupport.scl;h=eddcba75bbe074dcf19b268a1488296d05f9f048;hb=HEAD;hp=ae7fe4d8eaf236f5a164f2c49e6243eec362147c;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DBSupport.scl b/bundles/org.simantics.scl.db/scl/Simantics/DBSupport.scl index ae7fe4d8e..eddcba75b 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DBSupport.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DBSupport.scl @@ -1,7 +1,26 @@ import "UI/Progress" +import "Simantics/DB" + +importJava "org.simantics.db.common.utils.CommonDBUtils" where + + listClusters :: [ClusterUID] + resourcesByCluster :: ClusterUID -> [Resource] + directStatements :: Resource -> Boolean -> [Statement] + garbageResources :: [Resource] + clusterUIDOfResource :: Resource -> ClusterUID + isClusterLoaded :: ClusterUID -> Boolean + setImmutable :: Resource -> Boolean -> () importJava "org.simantics.scl.db.SCLFunctions" where collectClusters :: () + countQueries :: Integer + """ + restrictQueries amount step maxTimeInMs + + Collects some DB queries. Tries to reach at maximum 'amount' queries. + Uses at maximum 'maxTimeInMs' milliseconds in 'step' millisecond stints. + """ + restrictQueries :: Integer -> Integer -> Integer -> () importJava "org.simantics.db.layer0.util.Layer0Utils" where @JavaName emptyTrashBin @@ -9,3 +28,6 @@ importJava "org.simantics.db.layer0.util.Layer0Utils" where //emptyTrashBin :: () emptyTrashBin = emptyTrashBinWithMonitor $ createNullProgressMonitor () + +importJava "org.simantics.db.service.ClusterUID" where + data ClusterUID