You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/08/19 14:16:13 UTC

[GitHub] [incubator-age] seo-kw commented on issue #106: Agtype array casting

seo-kw commented on issue #106:
URL: https://github.com/apache/incubator-age/issues/106#issuecomment-901953463


   yup. It seems like a duct tape. lol I'm agree with you.
   
   As you seen in pdf above, Agtype can be casted to 3 ways varchar(char), bool, float.
   
   So i just choosed string conversion ( like a duct tape )
   
   ```
   WITH source as (
   SELECT *
   FROM cypher('test', $$
   WITH [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] as lst
   RETURN lst
   $$) AS ( lst varchar ) 
   )select string_to_array(substr(lst, 2, length(lst) - 2), ',')::int[] from source;
   ```
   also result is same as above.
   ```
        string_to_array
   --------------------------
    {0,1,2,3,4,5,6,7,8,9,10}
   (1 row)
   ```
   
   I cannnot help but it is  still like a ducktape. 
   
   But, well, I think, maybe it will better than above 
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@age.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org