MySQL Forums
Forum List  »  Connector/C++

Re: How do I insert or query geometry value with X DevAPI?
Posted by: Luis Silva
Date: December 13, 2019 06:01PM

Hi!

Whenever you want to send a function, you need to add the expr() so we know if its a string or a function:

tbl.insert("center").values(Value(expr("ST_GeomFromText('POINT(1 2)')"))).execute();

Documentation:
https://dev.mysql.com/doc/dev/connector-cpp/8.0/group__devapi.html#ga21018326a03bbb6653e315b6ebb5993b

Cheers,
Luís

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How do I insert or query geometry value with X DevAPI?
450
December 13, 2019 06:01PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.