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 |
Completion |
No due date |
No fixed build |
No time estimate |
Returning only 'date' as DATA_TYPE for date columns.