Questions tagged [mariasql]

A node.js binding to MariaDB's non-blocking (MySQL-compatible) client library

mariasql is a node.js binding to the non-blocking client library provided with MariaDB. It is compatible with MySQL.

This binding is different from other libmysqlclient bindings in that it uses the non-blocking functions available in MariaDB's client library.

Install it with the npm package installer:

npm install mariasql

The source code is located at github:node-mariasql.

References

143 questions
1
vote
0 answers

Maria db values are not getting inserted?

I am using Maria db. The values are not getting inserted into database. I am passing the value as Json array from my route. var insertValues = {'username': username, 'firstname': firstname, 'lastname': lastname, 'email': email, …
midhun k
  • 1,032
  • 1
  • 15
  • 41
1
vote
0 answers

How to Handle Error/Exception in Node.js?

I have written the code in Node.js to connect mariadb db using seneca micro service but i am not able to know how to handle error/exception and show the user a proper message. So please help me which types of error will come and how to handle…
Akash Sourav Nayak
  • 203
  • 1
  • 8
  • 21
1
vote
5 answers

How to turn off autocommit in mariadb?

I am using mariasql and the mysql workbench IDE for mariasql, but I am not able to disable the autocommit mode. How do I turn off the autocommit?
1
vote
1 answer

How do I keep the connection open to mariadb in nodejs using mariasql?

I use NodeJS, MariaDB and mariasql to store some data when a socket event occurres. The event can occur every 10 minutes or delay up to hours. Now I wonder if a connection timeout will occure, when there are no query executions for a long time. My…
Aley
  • 8,540
  • 7
  • 43
  • 56
1
vote
1 answer

mysql query for getting a list of items with reference to another table

i have table like this +----+-------+-------------+ | id | items | name | +----+-------+-------------+ | 1 | 1,2,3 | hot deals | | 2 | 2,3,4 | offers | +----+-------+-------------+ where items are the id of product here is the…
Ace
  • 59
  • 6
0
votes
1 answer

RAISE OR PRINT ERROR on Terminal if the condition is not met during UPDATE query

I am working on MARIADB terminal. I have a task to write query that deducts the quantity of a product by 5, before it updates, it needs to check that we have sufficient amount of quantity. If the quantity goes below 0 then we dont want to udpate,…
0
votes
2 answers

Filter rows that share two particular values

I have a table similar to what's below: ID VALUE 1 A 2 A 2 B 2 C 3 B I want to return a single row when an ID has both A and B values in the VALUE column. The result I want would look like this: ID VALUE 1 A 2 A &…
0
votes
1 answer

Delete row from one table based off another table

I have been trying to 3 days but can’t figure it out I have two tables One table called se with 12 columns and 1 unique ID. One column is npcid and it is not unique in this table. There’s another table called npcs where there is a unique id. The…
0
votes
1 answer

How to copy data from Amazon AWS S3 Bucket into a MariaDB SQL table in Apache Airflow

In Airflow I know that you can use SQLToS3Operator to copy data from an SQL database to an S3 bucket, but I need it to go the other way; copying data from an S3 bucket into an SQL database. This would specifically be copying keys into a table, one…
0
votes
1 answer

How to access MariaDB query result in Node.js?

I've recently started to teach myself Node.js to create websites and I need to retrieve a SELECT query from a mariaDB in order to ultimately use this data as a JSON response to a POST request from a web page on my client browser. I've searched the…
gwyver
  • 3
  • 3
0
votes
0 answers

Mariadb use database command giving 1049 error

Getting 1049 sqlstate 42000 error when trying to do Use command The database is being shown in show databases command
Vij P
  • 57
  • 5
0
votes
1 answer

Replace NULL with the Date in the WHERE clause in Mysql

So, in order to get 0s in my count column I have tried out this query which works. SELECT b.TXT_RECORD_DATE, a.TXT_CALL_TYPE, SUM(CASE WHEN b.TXT_CALL_TYPE IS NOT NULL THEN 1 ELSE 0 END) AS StatusCount FROM ( …
0
votes
1 answer

How to query a condition on a single object of sql record?

I'll try my best to explain the situation here. We are using Maria DB. In certain case we are looping over all the records/rows of a REQUESTS table. and for each object/record we are checking few conditions and if condition passes we are performing…
user3576036
  • 1,335
  • 2
  • 23
  • 51
0
votes
2 answers

How to classify categories according their parent id using sql

Suppose I have the following table id category_name parent_id 1 movies 0 2 technology 0 3 sci-fiction 1 4 romantic 1 5 documentries 0 6 space 3 7 heros 3 8 saturn 6 9 mars 6 10 black holes 6 What I want is order these…
0
votes
1 answer

GRANT on db with a separator in name not working

I have a problem on my Debian server with MariaDB on it. I'm trying to grant all privileges to a user ('agricoop') on my database called extranet-agricoop. I'm writing : GRANT ALL PRIVILEGES ON extranet-agricoop.* TO 'agricoop'@'localhost'; I get…
Jil0
  • 9
  • 2