X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.db%2Fscl%2FSimantics%2FDB.scl;h=3d71ae5143a577bf7ec7aeafa3f863b4b978260b;hp=280f6ebbf7286397a867b8f96e67fdfbc9c8df04;hb=47800b949fbb8cc2e260ede0a05c5cbb1a717c66;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl index 280f6ebbf..3d71ae514 100644 --- a/bundles/org.simantics.scl.db/scl/Simantics/DB.scl +++ b/bundles/org.simantics.scl.db/scl/Simantics/DB.scl @@ -256,6 +256,22 @@ importJava "org.simantics.db.common.utils.OrderedSetUtils" where importJava "org.simantics.db.common.utils.ListUtils" where @JavaName toList elementsOfList :: Resource -> [Resource] + + @JavaName create + createList :: [Resource] -> Resource + + @javaName insertBack + insertBack :: Resource -> [Resource] -> () + + @javaName removeElement + removeElement :: Resource -> Resource -> Boolean + + @javaName swapWithPrevious + swapWithPrevious :: Resource -> Resource -> Boolean + + @javaName swapWithNext + swapWithNext :: Resource -> Resource -> Boolean + importJava "org.simantics.db.common.utils.CommonDBUtils" where isParent :: Resource -> Resource -> Boolean @@ -302,6 +318,11 @@ importJava "org.simantics.scl.db.SCLFunctions" where unaryQuery :: (a -> b) -> a -> b unaryQueryCached :: (a -> b) -> a -> b + "Makes a new read request with given procedure for calculating the result. The request is cached only if the current request is listened." + subquery :: ( a) -> a + "Makes a new read request with given procedure for calculating the result. The request is always cached." + subqueryC :: ( a) -> a + importJava "org.simantics.db.layer0.util.Layer0Utils" where undo :: () -> String undoOperations :: Integer -> String @@ -312,6 +333,8 @@ importJava "org.simantics.db.layer0.util.Layer0Utils" where sortByCluster :: [a] -> (a->Resource) -> [a] makeSynchronous :: Boolean -> () listOntologies :: () -> [Resource] + emptyTrashBin :: () -> () + purgeDatabase :: () -> () @private @JavaName copyTo