Comments (6)
@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.
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.
@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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rds-data.