Skip to content

luasql #315

@saspivey98

Description

@saspivey98

What is the Addon for?

Add definitions for the luasql.

Additional Notes

I've already completed a decent portion. https://github.com/saspivey98/luasql-definitions

I'm running into two issues that I need some guidance:

1.) how to handle the 'require' regex

The luasql package has multiple addons (mysql, sqlite, firebird etc.). It is split where you install only the add-on through luarocks. However, they share most functions except maybe 1-5 specific ones per add-on. It makes sense to bundle them all together. Right now, I don't see a way to match require statements require('luasql.oci8') to a specific file luasql.oci8.lua without creating separate repositories. I've condensed all of them into one file so that when one requires require('luasql.XX') any add-on it will point to the general file. But that leads to another problem:

2.) minor inconvenience of the first require

With how its set up right now, when the user makes the first local driver = require('luasql.odbc'), the intellisense will provide all add-ons as possible environments. After the environment is chosen local env = driver.odbc(), where .odbc is the env, then it will accurately provide all the specific env info, conn info, and cursor info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    New AddonRelated to adding a new addon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions