Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(android): null value incorrectly interpreted as boolean #41

Merged
merged 6 commits into from
Oct 10, 2019

Conversation

garymathews
Copy link
Contributor

TEST CASE
const encLib = require('appcelerator.encrypteddatabase');
const db = Ti.Database.open('mydb');
const encDB = encLib.open('myencdb');

[db, encDB].forEach(x => {
	x.execute('CREATE TEMPORARY TABLE IF NOT EXISTS test(col TEXT)');
	x.execute('INSERT INTO test VALUES (NULL)');
	const rs = x.execute('SELECT col FROM test');
	while (rs.isValidRow()) {
        const fbn = rs.fieldByName('col');
        const f = rs.field(0);
		console.warn('col fieldByName: ' + JSON.stringify(fbn) + ' (' + typeof fbn + ')');
		console.warn('col field: ' + JSON.stringify(f) + ' (' + typeof f + ')');
		rs.next();
	}
	rs.close();
	x.close();
});
[WARN]  col fieldByName: null (object)
[WARN]  col field: null (object)
[WARN]  col fieldByName: null (object)
[WARN]  col field: null (object)

JIRA Ticket

@build
Copy link

build commented Oct 8, 2019

Messages
📖

💾 Here are the artifacts produced:

📖

✅ All tests are passing
Nice one! All 2 tests are passing.

Generated by 🚫 dangerJS against e7d53b2

@lokeshchdhry
Copy link
Contributor

FR Passed.

.fieldByName & .field are not boolean (false) but null.

SDK: 8.2.0.GA, latest 8.2.1 & 8.3.0
module : artifact from jenkins

@garymathews garymathews merged commit d85e5fd into tidev:master Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants