× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
JennyNishimura reported 2013-01-03T16:56:08Z  · last modified 2013-07-09T17:39:31Z

tojson function subfield returned for Mongo Date field


Dev
Emilian Bold
emilianbold
QA
Sachin Prakash
SachinPrakash
Priority Major
Complexity Unknown
Component MongoSQL
Version 14.0

Using the mongo command shell, create the "bios" collection from the Mongo documentation (http://docs.mongodb.org/manual/applications/create).

db.bios.insert(
   {
      _id: 1,
      name: { first: 'John', last: 'Backus' },
      birth: new Date('Dec 03, 1924'),
      death: new Date('Mar 17, 2007'),
      contribs: [ 'Fortran', 'ALGOL', 'Backus-Naur Form', 'FP' ],
      awards: [
                {
                  award: 'W.W. McDowell Award',
                  year: 1967,
                  by: 'IEEE Computer Society'
                },
                {
                  award: 'National Medal of Science',
                  year: 1975,
                  by: 'National Science Foundation'
                },
                {
                  award: 'Turing Award',
                  year: 1977,
                  by: 'ACM'
                },
                {
                  award: 'Draper Prize',
                  year: 1993,
                  by: 'National Academy of Engineering'
                }
      ]
   }
)

In ADS, query the fields for the "bios" collection.

select * from V$AQUADATABASE.TABLE_COLUMNS where TABLE_DATABASE = 'test' and TABLE_NAME = 'bios'

The result set is:

TABLE_DATABASE TABLE_NAME COLUMN_NAME DATA_TYPE
test bios _id number
test bios awards record (repeated)
test bios awards.award string
test bios awards.by string
test bios awards.year number
test bios birth record
test bios birth.tojson function
test bios contribs string (repeated)
test bios death record
test bios death.tojson function
test bios name record
test bios name.first string
test bios name.last string

Note that the "birth" and "death" fields have subfields "birth.tojson" and "death.tojson" with "function" data type.

 

Issue #8143

Closed
Fixed
Resolved 2013-01-04T10:30:07Z
 
 
Completion
No due date
No fixed build
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017