Giter VIP home page Giter VIP logo

Comments (12)

jimhester avatar jimhester commented on August 31, 2024 1

Yeah that seems reasonable to me

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

Handled as part of r-dbi/DBItest#159.

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

@jimhester @edgararuiz: Maybe it's more useful to return a third column type in dbListObjects(), with possible values "table", "view" and "temporary"? Or maybe two new columns, "is_view" and "is_temporary"? Do we need to provide filtering options in dbListObjects()?

from dbi3.

jimhester avatar jimhester commented on August 31, 2024

There are unfortunately many more table types ODBC data sources can use than table, view and temporary

"TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM", or a data source–specific type name.

https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqltables-function

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

Then it would be the backend's job to interpret its own values for the table type and fit it into the categories we provide.?

from dbi3.

edgararuiz-zz avatar edgararuiz-zz commented on August 31, 2024

That's always a challenge to design, because if we do that @krlmlr , we would need a "catch-all" category for those categories we don't explicitly catalog. I'm thinking of those database types that may have their own, very unique, table designations. This is a long way to say, that if we do, we'll need an "Other" category.

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

So maybe "type" (character) and "temporary" (logical), both supporting NA for not yet specified or unknown information?

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

dbRemoveTable() needs a temporary argument to make sure the right kind of table is removed with dbWriteTable(overwrite = TRUE).

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

Only MySQL/MariaDB seems to support dropping temporary tables via DROP TEMPORARY TABLE. The other two support a temp or pg_temp schema.

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

This was difficult for Redshift. Need to revisit.

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

Perhaps connections should keep track of temporary tables? Easier to do with a rewrite.

from dbi3.

krlmlr avatar krlmlr commented on August 31, 2024

We can register the temporary tables created through "official" means; it's not perfect but can help for databases that make it hard to enumerate temporary tables.

from dbi3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.