Re: world_x
Posted by: Christian Soutou
Date: August 26, 2016 08:43AM

Thanks Andrzej

--1

In my table the createCollection() methods doesn't underneath ?
Does the virtual column should be added?

CREATE DATABASE bd_json;

CREATE TABLE bd_json.tab_vol_json
(vol_id INT AUTO_INCREMENT PRIMARY KEY,
details_vol JSON
);

/*
CREATE TABLE `CountryInfo` (
`doc` json DEFAULT NULL,
`_id` varchar(32) GENERATED ALWAYS AS (json_unquote(json_extract(doc, '$._id'))) STORED PRIMARY KEY
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
*/


--2

OK if I want create a collection with the name of my table :

\use bd_json

mysql-js> db.createCollection("tab_vol_json")
MySQL Error (1050): Table 'tab_vol_json' already exists at (shell):1:3
in db.createCollection("tab_vol_json")

and db.getCollections() returns nothing.

Options: ReplyQuote


Subject
Views
Written By
Posted
1391
August 25, 2016 03:51AM
940
August 26, 2016 05:51AM
Re: world_x
943
August 26, 2016 08:43AM
891
August 26, 2016 01:18PM
836
August 28, 2016 04:24AM
783
August 28, 2016 08:45AM
820
August 28, 2016 10:40AM


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.