Giter VIP home page Giter VIP logo

Comments (4)

sagiegurari avatar sagiegurari commented on May 28, 2024

you sure the properties are missing and not there with value of type undefined?
I have a test that inserts 2 rows and sets 4 columns for each row. but the table holds 6 columns.
In the query output, i get all 6 columns where the other 2 are set to undefined.
You can see the test code here:

it('query', function (done) {
var table = 'TEST_ORA_POOL2';
initDB(table, [
{
COL1: 'PK1',
COL2: 2,
COL3: 30,
COL4: '123'
},
{
COL1: 'PK2',
COL2: 200,
COL3: 30,
COL4: 'SOME TEST HERE'
}
], function (pool) {
pool.run(function (connection, callback) {
connection.query('SELECT * FROM ' + table, [], {
resultSet: false
}, callback);
}, function (error, jsRows) {
assert.isNull(error);
assert.deepEqual([
{
COL1: 'PK1',
COL2: 2,
COL3: 30,
COL4: '123',
LOB1: undefined,
LOB2: undefined
},
{
COL1: 'PK2',
COL2: 200,
COL3: 30,
COL4: 'SOME TEST HERE',
LOB1: undefined,
LOB2: undefined
}
], jsRows);

from simple-oracledb.

behroozshafiabadi avatar behroozshafiabadi commented on May 28, 2024

yes it's my fault they are undefined.
is that any way to return empty string instead of undefined ?

from simple-oracledb.

sagiegurari avatar sagiegurari commented on May 28, 2024

oracle (and i'm not close to be an expert like the oracle team) has no concept of empty string.
when you insert empty string, it pushes null.
so when you query, you can't query by empty string, you query by is null.
so when you pull data that is 'empty string' it is basically null.
so in my layer, i always get undefined, no matter if you pushed empty string or null, because it is always stored in the db as null.
one of those strange oracle behaviors.

from simple-oracledb.

behroozshafiabadi avatar behroozshafiabadi commented on May 28, 2024

thanks your says are very useful

from simple-oracledb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.