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

TIMOB-20293 Add getFile method for Android #7653

Merged
merged 5 commits into from Feb 15, 2016
Merged

TIMOB-20293 Add getFile method for Android #7653

merged 5 commits into from Feb 15, 2016

Conversation

benbahrenburg
Copy link
Contributor

Add Titanium.Database.DB.getFile() for Android.

Jira Ticket: https://jira.appcelerator.org/browse/TIMOB-20293

Tested using KitchenSink db

var db = Titanium.Database.install('testdb.db','quotes');
var rows = db.execute('SELECT * FROM TIPS');
var count = rows.getRowCount();
Ti.API.info("count => " + count);
rows.close();

var file = db.getFile();
Ti.API.info("API Name =" + file.apiName);
Ti.API.info("path => " + file.getNativePath());

@hansemannn
Copy link
Collaborator

Thanks Ben! I can only see a (very minor) indentation issue. @ashcoding Can you review the method? Thanks guys!

@@ -73,7 +73,7 @@ properties:
setting file properties.
type: Titanium.Filesystem.File
permission: read-only
platforms: [iphone,ipad]
platforms: [android,iphone,ipad]
since: "2.0.0"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never had that before, but the docs seem to offer a way to set the since property platform-dependent:

    since:
        android: "2.0.0"
        iphone: "6.0.0"
        ipad: "6.0.0"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't aware that was available.

Add platform level updates for since document property
@benbahrenburg
Copy link
Contributor Author

@hansemannn looks like the since syntax recommended isn't supported. Any suggestions on an alternative?

@hansemannn
Copy link
Collaborator

Maybe without quotes? Saw it inside the ListView.yml

Starting to not be worth contributing
@benbahrenburg
Copy link
Contributor Author

@hansemannn @ashcoding everything passed, "since" set to specific version numbers assuming the most recent is 6.0.0.

@ashcoding
Copy link
Contributor

Code reviewed. Functionally tested to be working. Setting to 6.0.0 documentation is fine. Will do changes for that documentation accordingly for you.

@ashcoding
Copy link
Contributor

Accepted

ashcoding added a commit that referenced this pull request Feb 15, 2016
TIMOB-20293 Add getFile method for Android
@ashcoding ashcoding merged commit 269da93 into tidev:master Feb 15, 2016
@ashcoding
Copy link
Contributor

Doc update: #7724

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants