openresty / openresty/lua-nginx-module

Connection to MS SQL Server

Open
#747 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11.8k
Forks
2.1k
Avg merge
6h 1m
Merged PRs (30d)
6

Description

Hello!

For some reasons I need to communicate with Microsoft SQL Server in my lua-nginx-module script.

I'd successfully do this stuff using luasql.obdc module (link). So, I decide to use this code in nginx, but without result:

2016/04/27 17:10:17 [error] 12185#0: *1 lua entry thread aborted: runtime error: content_by_lua(nginx.conf:37):2: module 'luasql.odbc' not found: no field package.preload['luasql.odbc'] no file '/usr/share/lua/5.1/odbc/luasql/odbc.lua' no file '/etc/nginx/lualib/luasql/odbc.lua' no file '/etc/nginx/lualib/luasql/odbc/init.lua' no file './luasql/odbc.lua' no file '/etc/nginx/luajit/share/luajit-2.1.0-beta1/luasql/odbc.lua' no file '/usr/local/share/lua/5.1/luasql/odbc.lua' no file '/usr/local/share/lua/5.1/luasql/odbc/init.lua' no file '/etc/nginx/luajit/share/lua/5.1/luasql/odbc.lua' no file '/etc/nginx/luajit/share/lua/5.1/luasql/odbc/init.lua' no file '/etc/nginx/lualib/luasql/odbc.so' no file './luasql/odbc.so' no file '/usr/local/lib/lua/5.1/luasql/odbc.so' no file '/etc/nginx/luajit/lib/lua/5.1/luasql/odbc.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/etc/nginx/lualib/luasql.so' no file './luasql.so' no file '/usr/local/lib/lua/5.1/luasql.so' no file '/etc/nginx/luajit/lib/lua/5.1/luasql.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: coroutine 0: [C]: in function 'require'

I know there is resty.mysql module to work with MySQL, but it is not my variant.

So, do you have any ideas how to implement MS SQL Server support into lua-nginx-module.

Thanks in advance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the issue's content_by_lua example and the require('luasql.odbc') failure, then compare the mentioned resty.mysql module with the repository's Lua integration points. No repository file or test is identified in the issue; done would require a defined approach for communicating with Microsoft SQL Server from lua-nginx-module.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, sql
Domain
backend, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.