Code Monkey home page Code Monkey logo

Comments (6)

cbschuld avatar cbschuld commented on July 19, 2024 1

@MarkHerhold - I don't disagree. Also, it maybe a best-foot-forward time to rename some of the other types as well.

from rds-data.

spolom avatar spolom commented on July 19, 2024 1

I ran into this too, while trying out this great looking lib out for the first time today.
E.g. PostgreSQL uses timestamptz for select now() and when I casted it to a char it became a text.

from rds-data.

cbschuld avatar cbschuld commented on July 19, 2024

@MarkHerhold I like this proposal for sure - it is breaking but I do not think there is heavy use yet so I am fine to take the heat for a breaking change now

from rds-data.

cbschuld avatar cbschuld commented on July 19, 2024

Mark, should we keep the types relative to the RDS library (such as RDSColumnValue) or do you feel ColumnValue is better (I like plain ColumnValue better IMO).

from rds-data.

MarkHerhold avatar MarkHerhold commented on July 19, 2024

Since it's not an AWS implementation, I'd stick with ColumnValue but I'm always happy to hear other opinions.

I can work on a PR for this as well. I have a number of changes going on concurrently as I try to get this library to work and am making issues as I investigate. 👍

from rds-data.

MarkHerhold avatar MarkHerhold commented on July 19, 2024

Just adding notes:
I need enums to work with this lib as well, meaning we can't hardcode types (unless we provide overrides).

test('select an enum', async () => {
  const rds = setupRDSDatabase().getInstance();
  await rds.query(
  `DO $$ BEGIN
    CREATE TYPE enum_abc AS ENUM ('a', 'b', 'c');
  EXCEPTION
    WHEN duplicate_object THEN null;
  END $$;`);
  const results = await rds.query(`select 'a'::enum_abc as value, pg_typeof('a'::enum_abc) as type`);

  expect(results.data[0].value.string).toEqual('a');
  expect(results.data[0].type.string).toEqual('enum_abc');
});

from rds-data.

Related Issues (11)

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.