Titanium JIRA Archive
Alloy (ALOY)

[ALOY-718] ALLOY: SQL sync adapter should not require knowledge of the table name

GitHub Issuen/a
TypeImprovement
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsModels, Runtime
Labelsalloy, sqlite
ReporterNeville Dastur
AssigneeUnknown
Created2013-06-21T15:21:43.000+0000
Updated2018-03-07T22:26:07.000+0000

Description

The query that is passed to fetch() when using the sql sync adapter requires the table name to be specified. The example in Git https://github.com/appcelerator/alloy/blob/master/test/apps/models/sql_queries/controllers/main.js highlights the issue. So the collection is called color, but the table name is colors. It would be better if the table name could be replaced with a place holder in the string e.g. {tablename} or if the sql string does not start with SELECT then a SELECT * FROM is pre-pended. Alternatively, expose the tablename as a property of the Alloy Collection

Comments

No comments

JSON Source