mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 02:29:34 +02:00
Improve ODBC import
This commit is contained in:
parent
577eeb642f
commit
fbfbb96872
43 changed files with 718 additions and 539 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
%% API
|
||||
-export([init/2, set_data/3, get_data/3, get_all_data/2, remove_user/2,
|
||||
import/1, import/2, export/1]).
|
||||
import/3, export/1]).
|
||||
|
||||
-include("xmpp.hrl").
|
||||
-include("mod_private.hrl").
|
||||
|
@ -77,16 +77,8 @@ export(_Server) ->
|
|||
[]
|
||||
end}].
|
||||
|
||||
import(LServer) ->
|
||||
[{<<"select username, namespace, data from private_storage;">>,
|
||||
fun([LUser, XMLNS, XML]) ->
|
||||
El = #xmlel{} = fxml_stream:parse_element(XML),
|
||||
#private_storage{usns = {LUser, LServer, XMLNS},
|
||||
xml = El}
|
||||
end}].
|
||||
|
||||
import(_, _) ->
|
||||
pass.
|
||||
import(_, _, _) ->
|
||||
ok.
|
||||
|
||||
%%%===================================================================
|
||||
%%% Internal functions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue