Re: performInsert() postgres json
ok. Thanks On Mon, Jan 13, 2020 at 4:31 PM Karl Wright wrote: > If you can just put JSON in a string that would work fine. > > Karl > > > On Mon, Jan 13, 2020 at 3:36 AM SREEJITH va wrote: > >> Thanks Karl. >> >> I am trying to use WrappedConnection which I am getting through below API >> and using it for database operations in my connector. >> >> >> *ConnectionFactory.getConnection(jdbcURL, _driver, >> ManifoldCF.getMasterDatabaseName(), >> ManifoldCF.getMasterDatabaseUsername(), >> ManifoldCF.getMasterDatabasePassword(), >> maxDBConnections, false);* >> >> In this way I can run the query directly and overcome the issue with json >> datatype. Is it ok to proceed with this or I should not directly use >> wrapper connections ?. Any performance concerns using wrapperconnections >> manually for connector instead of extending BaseTable. >> >> >> On Thu, Jan 2, 2020 at 7:26 PM Karl Wright wrote: >> >>> The Basetable abstraction doesn't recognize specialty column types like >>> JSON; it's got a limited set of types it knows about, and that is by design >>> so multiple implementations can be written for different databases. >>> >>> Karl >>> >>> >>> On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va >>> wrote: >>> Hi Karl and Team, I have a situation where I have to call *performInsert(parameterMap, null)* on a postgres database table with json column. I am getting below error during the insert. *column "X" is of type json but expression is of type character varying Hint: You will need to rewrite or cast the expression.* Is there any way I can achieve this using Basetable api? -- Regards -Sreejith >>> >> >> -- >> Regards >> -Sreejith >> > -- Regards -Sreejith
Re: performInsert() postgres json
If you can just put JSON in a string that would work fine. Karl On Mon, Jan 13, 2020 at 3:36 AM SREEJITH va wrote: > Thanks Karl. > > I am trying to use WrappedConnection which I am getting through below API > and using it for database operations in my connector. > > > *ConnectionFactory.getConnection(jdbcURL, _driver, > ManifoldCF.getMasterDatabaseName(), > ManifoldCF.getMasterDatabaseUsername(), > ManifoldCF.getMasterDatabasePassword(), > maxDBConnections, false);* > > In this way I can run the query directly and overcome the issue with json > datatype. Is it ok to proceed with this or I should not directly use > wrapper connections ?. Any performance concerns using wrapperconnections > manually for connector instead of extending BaseTable. > > > On Thu, Jan 2, 2020 at 7:26 PM Karl Wright wrote: > >> The Basetable abstraction doesn't recognize specialty column types like >> JSON; it's got a limited set of types it knows about, and that is by design >> so multiple implementations can be written for different databases. >> >> Karl >> >> >> On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va wrote: >> >>> Hi Karl and Team, >>> >>> I have a situation where I have to call *performInsert(parameterMap, >>> null)* on a postgres database table with json column. I am getting >>> below error during the insert. >>> >>> >>> *column "X" is of type json but expression is of type character >>> varying Hint: You will need to rewrite or cast the expression.* >>> >>> Is there any way I can achieve this using Basetable api? >>> >>> >>> -- >>> Regards >>> -Sreejith >>> >> > > -- > Regards > -Sreejith >
Re: performInsert() postgres json
Thanks Karl. I am trying to use WrappedConnection which I am getting through below API and using it for database operations in my connector. *ConnectionFactory.getConnection(jdbcURL, _driver, ManifoldCF.getMasterDatabaseName(), ManifoldCF.getMasterDatabaseUsername(), ManifoldCF.getMasterDatabasePassword(), maxDBConnections, false);* In this way I can run the query directly and overcome the issue with json datatype. Is it ok to proceed with this or I should not directly use wrapper connections ?. Any performance concerns using wrapperconnections manually for connector instead of extending BaseTable. On Thu, Jan 2, 2020 at 7:26 PM Karl Wright wrote: > The Basetable abstraction doesn't recognize specialty column types like > JSON; it's got a limited set of types it knows about, and that is by design > so multiple implementations can be written for different databases. > > Karl > > > On Thu, Jan 2, 2020 at 8:49 AM SREEJITH va wrote: > >> Hi Karl and Team, >> >> I have a situation where I have to call *performInsert(parameterMap, >> null)* on a postgres database table with json column. I am getting >> below error during the insert. >> >> >> *column "X" is of type json but expression is of type character >> varying Hint: You will need to rewrite or cast the expression.* >> >> Is there any way I can achieve this using Basetable api? >> >> >> -- >> Regards >> -Sreejith >> > -- Regards -Sreejith