Transpiled version (477L) is out of date.
1 | !752 |
2 | |
3 | lib 1004017 // Berkeley DB |
4 | |
5 | import com.sleepycat.je.DatabaseException; |
6 | import com.sleepycat.je.Environment; |
7 | import com.sleepycat.je.EnvironmentConfig; |
8 | |
9 | import com.sleepycat.persist.EntityStore; |
10 | import com.sleepycat.persist.StoreConfig; |
11 | |
12 | p { |
13 | Environment myEnv; |
14 | EntityStore store; |
15 | |
16 | bool readOnly = false; |
17 | File envHome = mkdir(getProgramDir()); |
18 | |
19 | print("Opening Berkely DB in " + envHome.getAbsolutePath()); |
20 | |
21 | EnvironmentConfig myEnvConfig = new EnvironmentConfig(); |
22 | StoreConfig storeConfig = new StoreConfig(); |
23 | |
24 | myEnvConfig.setAllowCreate(!readOnly); |
25 | storeConfig.setAllowCreate(!readOnly); |
26 | |
27 | // Open the environment and entity store |
28 | myEnv = new Environment(envHome, myEnvConfig); |
29 | store = new EntityStore(myEnv, "EntityStore", storeConfig); |
30 | |
31 | print("Closing"); |
32 | |
33 | if (store != null) |
34 | store.close(); |
35 | if (myEnv != null) |
36 | myEnv.close(); |
37 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004018 |
Snippet name: | Test Berkeley DB |
Eternal ID of this version: | #1004018/1 |
Text MD5: | 1be599d2bb8be549b820f9680521a167 |
Author: | stefan |
Category: | javax / databases |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-08-03 17:57:23 |
Source code size: | 912 bytes / 37 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 553 / 610 |
Referenced in: | [show references] |