Skip to content

implement connection mysql server with charset (default charset is utf8) #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zhaojp0411
Copy link

Note : I don't use in product yet.

@agentzh
Copy link
Member

agentzh commented Aug 30, 2013

First of all, thank you for your contribution!

But I can see that there are some minor issues in your patch:

  1. could you strictly follow the Lua coding style used in this library? I see you're using inconsistent indentations and spaces around binary operators like "=" and "%", for example.
  2. I think logically the client should not default to UTF-8 but rather default to the server-side settings. Also, this way we won't break backward compatibility of this library.
  3. Could you add some test cases for this change to the existing test suite?
  4. I think it is a good idea to move the charsetlist table to the module toplevel scope so that we don't have to construct this big Lua table every time we call the _getcharset function in connect().
  5. You declare and initialize the new "strfmt" local variable but you never use it in your patch.
  6. Have you tested your patch with earlier versions of MySQL like 5.5 or 5.1?

Will you update the patch accordingly?

Thanks for your patience!
-agentzh

@zhaojp0411
Copy link
Author

thank you for review the code .
I update the patch accordingly .
I am using vim edit lua code .so can you give me some extra help for development for lua with nginx .thank you
how create unit test script for lua thank you .

@agentzh
Copy link
Member

agentzh commented Sep 2, 2013

@zhaojp0411 you can take a look at my .vimrc file here: http://agentzh.org/misc/.vimrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants