Skip to content
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

Bulk insert doesn't understand table names wrapped in brackets #6

Closed
patriksimek opened this issue Dec 17, 2015 · 4 comments
Closed

Comments

@patriksimek
Copy link

tm = connection.tableMgr();
tm.bind("bulk_table", function(mgr) {
    assert(mgr.columns.length > 0); // OK
});
tm = connection.tableMgr();
tm.bind("[bulk_table]", function(mgr) {
    assert(mgr.columns.length > 0); // Fails
});

Temporary tables are not recognized regardless if they're in brackets or not.

tm = connection.tableMgr();
tm.bind("#mytemptable", function(mgr) {
    assert(mgr.columns.length > 0); // Fails
});
@Miramac
Copy link
Contributor

Miramac commented Dec 29, 2015

Also tables with schema indication are not recognized:

tm = connection.tableMgr();
tm.bind("dbo.bulk_table", function(mgr) {
    assert(mgr.columns.length > 0); // Fails
});

@TimelordUK
Copy link
Owner

I will look at issue soon. It is probably due to a regular expression substitution in the code for the table name. If you get time you could try and hard wire the name of table you are testing in the describe.sql. I am
away from terminal so can't test right now. If this works we know this is issue and how to fix it.

@TimelordUK
Copy link
Owner

Global temp tables should now work ok ##. Looking at documentation it does not look like it will be easy to get this working on local temp but I will keep looking.

@TimelordUK
Copy link
Owner

This should be sorted now - different schemas and temp tables are now supported in API, thanks for raising with me. If you get a chance please merge the pull request for TVP into your msnodesqlv8 driver!

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

No branches or pull requests

3 participants