Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add namespacing/modules

See original GitHub issue

Is your feature request related to a problem? If yes, please describe the problem.

When we’d like to implement a more broad set of the resources/integrations we’ll encounter a namespacing issue, kind of modules/namespaces/groups would be a handy solution to it.

For example when we’d like to develop the resources for accessing MySQL and MongoDB both ORM modules could potentially have a method like mysql:findOne({}) / mongodb:findOne({}). There’s actually no way for avoid resource overlapping other than naming convention (egmysql_findOne() - which actually is not an elegant solution)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

czerwinskilukasz1commented, May 2, 2021

On the other hand, what I think we could do is to have a way to return a MySQL object which has a number of fields, each of them being a function (e.g. field findOne being a function for finding a single row in a table etc.) and then run mysql.findOne(). Please note that here we use dot instead of the colon. In AskScript we used colon for the “method” syntax sugar and method chaining, but dot for accessing properties (see e.g. this sample .ask file: )

mhagmajercommented, May 18, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Namespaces and Modules - TypeScript
Namespaces are a TypeScript-specific way to organize code. Namespaces are simply named JavaScript objects in the global namespace. This makes namespaces a very ......
Read more >
Packaging namespace packages
Namespace packages allow you to split the sub-packages and modules within a single package across multiple, separate distribution packages (referred to as ...
Read more >
Using and importing modules and namespaces
A key point with modules is that they produce separate namespaces. A namespace (also called a scope) is simply the domain of control...
Read more >
How To Use Namespaces in TypeScript | DigitalOcean
In TypeScript, you can use namespaces to organize your code. Previously known as internal modules, namespaces in TypeScript are based on an ...
Read more >
How do I create a namespace package in Python?
There's a standard module, called pkgutil, with which you can 'append' modules to a given namespace.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found