AlexDenisov / iActiveRecord

ActiveRecord for iOS without CoreData, only SQLite
http://alexdenisov.github.com/iActiveRecord/
MIT License
354 stars 50 forks source link

How to create View in ActiveRecord #93

Open minhthuc251 opened 8 years ago

minhthuc251 commented 8 years ago

I want to create View with my sql query like this : CREATE VIEW IF NOT EXISTS view_table_status AS Select a.AreaId, a.AreaName, OrderId, t.AccountId, t.AccountNo, Amount, CustomerId, CustomerName, CustomerCategoryId, CustomerCategoryName, i.DispStatus, t.LocationId, LocationName, TotalAmount, OrderCode, OrderFullName, t.TableId, t.TableName, TableTypeId, ProductAmount FROM tbl_tables t LEFT JOIN tbl_areas a ON t.AreaId=a.AreaId LEFT OUTER JOIN tbl_orders i ON t.TableId=i.TableId AND (i.DispStatus='4' OR i.DispStatus='2' OR i.DispStatus='5');

Anyone help me how i can do it with activeRecord

AlexDenisov commented 8 years ago

I don't think it's possible with iActiveRecord, even despite the fact that the project is abandoned.