summaryrefslogtreecommitdiffstats
path: root/acf2/init.lua
blob: 95ce91ea971872998057426d4111b6ba8ceb1056 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--[[
Copyright (c) 2012-2014 Kaarle Ritvanen
See LICENSE file for license details
--]]

local M = {}

M.model = require('acf2.model')

require('acf2.model.aaa')
local mods = require('acf2.loader')('modules')

M.call = require('acf2.error').call
M.object = require('acf2.object')
M.path = require('acf2.path')
M.start_txn = require('acf2.transaction')

local txn = M.start_txn()
for _, rv in pairs(mods) do if type(rv) == 'function' then rv(txn) end end
txn:commit()

local def_store = require('acf2.persistence.defer')
function M.commit() def_store:commit() end

return M