Emysql icon indicating copy to clipboard operation
Emysql copied to clipboard

add fun "emysql:as_maps/1"

Open dcy opened this issue 10 years ago • 7 comments

Hi! I added the fun "emysql:as_maps/1". And the test result: 21 basics_SUITE conversion maps_empty_test < > 0.000s Ok
22 basics_SUITE conversion maps_single_test < > 0.000s Ok
23 basics_SUITE conversion maps_multi_test < > 0.000s Ok

dcy avatar Nov 04 '14 17:11 dcy

The Travis Ci build's error because maps are not support in R16

dcy avatar Nov 06 '14 10:11 dcy

Maybe it's better to enable this function only for OTP >= 17 for compatibility?

tnt-dev avatar Nov 06 '14 14:11 tnt-dev

How to enable this function only for 17?

dcy avatar Nov 06 '14 17:11 dcy

Could you have a look at this pull request??

dcy avatar Nov 18 '14 14:11 dcy

@dcy, You can use something like

{platform_define, "^[0-9]+", maps_available} 

in rebar.config and

-ifdef(maps_available).
-export([as_maps/1]).
-endif.

in code.

tnt-dev avatar Nov 18 '14 15:11 tnt-dev

"-ifdef(maps_available)." works in emysql.erl but not works in basics_SUITE.erl

And what's the problem with The Travis CI: The command "source $HOME/otp/17.0-rc1/activate" failed and exited with 1 during . Your build has been stopped.

dcy avatar Nov 18 '14 17:11 dcy

And what's the problem with The Travis CI: The command "source $HOME/otp/17.0-rc1/activate" failed and exited with 1 during . Your build has been stopped.

Try to change otp_releases in travis.yml from

 - 17.0-rc1

to

 - 17.3
 - 17.1
 - 17.0

tnt-dev avatar Nov 19 '14 08:11 tnt-dev