Questions tagged [mysql-x-devapi]

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.

64 questions
0
votes
1 answer

MySql: xDevApi "collection.modify" not doing anything

I'm testing MySql 8 "XDevApi" with Nodejs, and I'm trying to modify a field in a document Here is the code : let vModifyOp=await vCollection.modify('_id = "000062817c620000000000000001"').set('wName','toto'); I don't have any errors or…
0
votes
0 answers

Values in MySQL 8 document store are being escaped when stored, but not unescaped when retrieved

I have PHP 8 and MySQL 8 running using the xdevapi. Everything is working well with it, but I am running into an issue storing data in a document in a collection. I have the following methods in a class: use YYY\DatabaseDS; final class Draft { …
Joseph
  • 1,988
  • 14
  • 21
0
votes
5 answers

How is date encoded/stored in MySQL?

I have to parse date from raw bytes I get from the database for my application on C++. I've found out that date in MySQL is 4 bytes and the last two are month and day respectively. But the first two bytes strangely encode the year, so if the date is…
Bibasmall
  • 33
  • 4
0
votes
0 answers

Would like to prevent possible code Injection on legacy PHP web app

So our ancient web app manages to pass an annual code review with minimal red flags. One of those possible security risks was this function below that gets a user's session info. private function getJobTrackerSessionInfo() { // Get session data…
Powermaster Prime
  • 402
  • 1
  • 2
  • 16
0
votes
2 answers

MYSQL XDev API Javascript Select all from a table

I'm trying to get all the promocodes out of a table but I'm not sure what we should use for the bind parameter. I tried '*', ' ', '%%', and '%' but the results came out undefined/no results. Anyone know how to get all the results? …
nmsdev
  • 29
  • 6
0
votes
1 answer

MYSQL XDEVAPI Multiple OR (II) Request

I'm using the XDEVAPI and trying to use the or(||) statement in javascript, but it seems to break after 1 or/(||) statements, I have 5 separate statuses I'm trying to pull from the DB: .select(['customer_name', 'account_status', …
nmsdev
  • 29
  • 6
0
votes
1 answer

@mysql/xdevapi How to debug "wrong number of fields in row being inserted" in nodejs?

I successfully connected to a local MySQL server using the new x-authentication. I have a products table with the following schema (DDL): CREATE TABLE `products` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(45) NOT NULL, …
0
votes
1 answer

MySQL xdevapi Node Error: SELF_SIGNED_CERT_IN_CHAIN

Windows 10 Pro MySQL8.0 node.js v14.15.5 openssl 1.1.1c I'm trying to connect to a MySQL database using node, I'm able to connect without TLS just fine. I used openssl to create a private key and self signed certificate. When I try to use TLS in…
LarryN
  • 216
  • 1
  • 2
  • 12
0
votes
1 answer

MYSQL X DEV API Update method not working

I could not find a good template for the update method for the xdevapi library and thought maybe some one could help me out with getting this to work. acts_table .update() .set('account_status', 'new account status') …
nmsdev
  • 29
  • 6
0
votes
1 answer

How to query for Null or Missing Fields in Mysql X DevAPI?

How to query for null or missing field in Mysql X DevAPI? I tried .find("age IS NULL") and .find("age = null") but both not work. > db.createCollection('users') > db.getCollection('users').add({ name: "foo", age: 30 }) >…
Lam Dinh
  • 3
  • 1
0
votes
0 answers

Where do I find the Connector/C++ debug package (X DevAPI)?

I was able to build a MyySQL\C++ project in release mode, but I'd like to build it in debug mode as well. The documentation says that I'll need to install the Connector/C++ debug package in order to build in debug mode, but the debug package is no…
pctopgs
  • 439
  • 1
  • 4
  • 10
0
votes
1 answer

Running arbitrary SQL commands MySQL C++ (X DevAPI)?

I've connected my C++ project to MySQL and successfully created a session. I was able to create a Schema. My issue is that when I try to run simple arbitrary queries like USE testSchema SHOW tables; using the MySQL/C++ api, I run into SQL syntax…
pctopgs
  • 439
  • 1
  • 4
  • 10
0
votes
1 answer

Searching nested arrays with X DevAPI

I want to use a MySQL database to manage a collection of documents in JSON format. Let's say each document has this structure: { "firstname":"John", "lastname":"Smith", "books":[ { "title":"Dune", "author":"Frank Herbert" }, {…
KarlKEP
  • 11
  • 2
0
votes
1 answer

How do you use the MySQL Connector/C++ and XDevAPI while using XAMPP to run MySQL?

I am trying to access a MySQL database in my C++ code. I have a feeling I may have messed something up along the way, so I'll outline what steps I took and my setup: I installed MySQL Connector/C++ I installed MySQL XDevAPI I installed XAMPP and…
user3713569
  • 209
  • 1
  • 4
  • 13
0
votes
1 answer

mysqlx plugin unreachable on Amazon RDS (MySQL 8.0)

Running local instances okay but have problem connecting to MySQL RDS AWS, not a connectivity issue to RDS private network. This is the error when attempting to make a connection. ERROR - Unable to sync database. Connection attempt to the server…
Kevin
  • 828
  • 11
  • 14