The MySQL X DevAPI is an application-level interface used by clients and connectors built on top of the X Protocol. It specifies a common set of CRUD-style and SQL functions/methods to work with both document store collections and relational tables, a common expression language to establish query properties such as criteria, projections, aliases, and additional database management features for handling things like transactions, indexes, etc.
Questions tagged [mysql-x-devapi]
64 questions
1
vote
1 answer
mysqlx python connector NoSQL can't insert date
I'm using mysqlx XDevAPI for python (NoSQL). I can't insert a date into my table.
table = my_schema.get_table("date_table")
field = "date_field"
insert = table.insert(field)
value = datetime.datetime.now()
insert.values(value)
insert.execute
I get…

ChiPhi85
- 61
- 5
0
votes
0 answers
Any tutorials available for using X Dev Api in MySql Document db in Java application
the official XDevApi user guide for using MySql document store for java applications is not very descriptive when it comes to doing CRUD operation.
Are there any tutorials available for easy of learning and using this in my spring boot java…

sipicaa
- 41
- 3
0
votes
0 answers
Response size limit surpassed in actix web with Mysqlx in rust
I am trying to create a REST-API in Rust, using mysqlx and actix_web. I have one database called db in which I have two tables: users and fhekeys. At the moment when a HttpRequest with POST body is received by the API, it retrieves a key from…

Raul
- 41
- 4
0
votes
0 answers
How to update JSON value in mysql database using X Dev API for relational table
I am trying to emulate UPDATE user SET userDetails = JSON_SET(userDetails, '$.name', 'Alok') WHERE id = 1; to update JSON value using X Dev API.
var updateValue = `JSON_SET(userDetails, '$.name', 'Alok')`
var result = await…

Alok
- 7,734
- 8
- 55
- 100
0
votes
0 answers
trouble with mysql_xdevapi extension
I am trying to install the mysql_xdevapi extension because it's required to use the NemioApi bundle for Symfony.I installed all the necessary dependencies for it to work,i.e protobuf and boost libraries, still , after installing the extension's .dll…

iHateGrapes
- 1
- 1
0
votes
1 answer
Node.js, Express.js and @mysql/xdevapi based Boilerplate code?
I am using @mysql/xdevapi in my Express.js application for creating REST web APIs.
My current way of using @mysql/xdevapi is
const mysqlx = require('@mysql/xdevapi')
const options = {
host: 'mysql',
port: 33060,
password: 'password',
…

Alok
- 7,734
- 8
- 55
- 100
0
votes
0 answers
Using MySql Document Store in Quarkus give exception "java.lang.NoClassDefFoundError: com/google/protobuf/Message" while creating session
I am trying to use MySql Document Store in Quarkus. Following is the code for creating a session and reading the collection
public class MyService {
@Inject
DataSource dataSource;
@ConfigProperty(name = "datasource.url")
private…

Dee Jai
- 9
- 3
0
votes
1 answer
Reconnect logic on connection close in X DevAPI of MySql using @mysql/xdevapi module in Node.js
I am using X DevAPI of MySql v8.0.33 using @mysql/xdevapi v8.0.33.
I have reconnect logic added but that is not working. Here is that code.
const mysqlx = require('@mysql/xdevapi')
async function createSession() {
try {
const session = await…

Alok
- 7,734
- 8
- 55
- 100
0
votes
1 answer
Initialize cobject with move assignment/constructor c++ in another class constructor
I'm using the mysqlx-api/xdevapi.h (mysql connector 8) for my application. My code is object oriented, and I want to initialize the connection to the database in the class constructor. It that possible? If not, is there any disadvantages of…

Mary
- 5
- 2
0
votes
1 answer
connector/node.js collection.add().execute() seems to only work once
I am testing MySQL Document Store. In order to properly compare with our relational tables, I am attempting to transform our current table into a collection. There approximately 320K records in the table that I wish to export and add to a new…

Loco
- 3
- 2
0
votes
2 answers
X devAPI batch insert extremely slow
I use the C++ connector for MySQL and the X dev API code.
On my test server (my machine), doing a single insert in loop is pretty slow (about 1000 per second) on a basic table with a few columns. It has a unique index on a char(40) field which is…

Bew Games
- 11
- 2
0
votes
1 answer
How can I query for multiple values after a wildcard?
I have a json object like so:
{
_id: "12345",
identifier: [
{
value: "1",
system: "system1",
text: "text!"
},
{
value: "2",
system: "system1"
}
]
}
How can I use the…

Beau Berger
- 3
- 1
0
votes
2 answers
How to use results from mysql built-in functions when inserting via mysql-x-devapi in C++?
I am using mysql-x-devapi and need to insert a row to a table and put UNIX_TIMESTAMP() of the server in a column:
sql_client_.getSession().getDefaultSchema()
.getTable("event")
.insert("title", "time")
.values("event title",…

Null
- 349
- 2
- 12
0
votes
1 answer
Typescript : store an arrayBuffer into MySQL database using blob and xdevapi
I want to store user files (images most of the time, but it can be anything) retrieved with a HTML input, into MySQL database.
So I want to store the arrayBuffer of a file in a MySQL blob, using @mysql/xdevapi
What I'm using :
Angular with…

Sacha Moboth
- 13
- 1
- 4
0
votes
1 answer
MySQL XDev API - Node.js Connector - client.getSession() never resolve nor throw after few hours
I use the MySQL XDevAPI connector in nodejs to connect to a MySQL db on the same server. It runs successfully few hours until, at some point await pool.getSession() never resolve nor throw any error.
MySQL is version 8.0.29-0ubuntu0.20.04.3
NodeJS…

Jordan Breton
- 1,167
- 10
- 17