We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc9987e commit bb1c492Copy full SHA for bb1c492
tests/analysis_tests/tests/src/ExhaustiveSwitch.res
@@ -41,3 +41,29 @@ let vvv = Some(x->getV)
41
// switch withSomeVarian
42
// ^com
43
// ^ve-
44
+
45
+module Sqlite = {
46
+ module Transaction = {
47
+ type t<'a>
48
49
+ external runImmediate: t<'a> => 'a = "immediate"
50
+ }
51
52
+ module Database = {
53
+ type t
54
55
+ external make: () => t = "default"
56
57
+ external transaction: (t, unit => 'a) => Transaction.t<'a> = "transaction"
58
59
+}
60
61
+let openSqliteDB = () => Sqlite.Database.make()
62
63
+let transactionForProject = (fn) => {
64
+ openSqliteDB()
65
+ ->Sqlite.Database.transaction(fn)
66
+ ->Sqlite.Transaction.runImmediate
67
+ // ^xfm
68
+ ->ignore
69
0 commit comments