0
votes

I want to cache a postgres table into apache ignite cache; with json and jsonb support.

CREATE TABLE public.some_event (
    id BIGINT NOT NULL, 
    name TEXT, 
    team_squad JSON, 
    event_type TEXT, 
    start_datime BIGINT, 
    end_datime BIGINT, 
    is_running BOOLEAN, 
    is_finished BOOLEAN, 
    recent_matches JSON, 
    CONSTRAINT event_info_pkey 
    PRIMARY KEY (id)
);

for say in apache ingite configuration,

"recent_matches" field is selected as jdbc type of other, and java type is Object; I get PGObject.

if field is selected as jdbc type varchar and java type is String; I get escaped json like this

"\"id\"": ..."

if sql with type casting ::text I get BufferedStream.

I don't need any special filtering for json or any special sql. Just want to send string for insert and update. For reading, the json string without double quote escaping.

As I am new to apache ignite, From documentation I am unable to understand binary marshaling and I am unable to find any complete example.

Can you provide any complete example?

1

1 Answers

0
votes

Ignite has no specific support for PostgreSQL's JSON type.

You might need to extend CacheJdbcPojoStore, override fillParameter() method.