Of course the REST Api must provide endpoints as an equivalent to the usual CRUD operations. If you create a database interface and then implement a class on it which makes use of a specific REST Api out there in the cloud, then you can program against the interface, instead of directly accessing the REST Api or a database connection. How do you create common CRUD methods and then link them to the URLConnection? how do you do this when the database is a RESTful API server and not a persistent database connection such as MySQL or SQLite? I can still create classes but I can’t figure out how to embed the URLConnection. Do you use a single URLConnection per window for all methods or do you create a URLConnection for each method so that you can perform the correct actions for each Green: I’d love to learn more about how you use ORM Classes with URLConnection. I implemented a constructor to create a ‘Team’ from a JSONItem when receiving a record from the server… and a Team.ToJSON method to spit it back out again for CREATE and UPDATE operations.Įxamples of database applications that use databases with persistent connections often include object classes with methods for reading, saving, creating and deleting data but how do you do that with URLConnection? I’ve created classes that describe my data objects (‘Teams’, ‘Players’, etc…) and their associated properties (‘TeamID’, ‘TeamName’, etc…). The big difference is that an SQLSelect() is synchronous while URLConnection is Asynchronous. My goal is to leverage Classes to facilitate CRUD operations via URLConnection in the same way that you might do it with a local database. ORM? I’ve studied the code produced by ARGen and I learn something new every time I look at it… but I fail to see how it could be used with a RESTful API server. Perhaps I’m using the incorrect terminology? Active Record vs. Return the RecordSet (or DBError boolean for SQLExecute) to user.Reverse the Base64, decryption and compression into optional RecordSet.Return the Base64 as the URLConnection response.build a Dictionary of the results (DBError boolean, DBErrorMessage, DBErrorCode and optional RecordSet).Run the SQL Prepared statement (SQLSelect or SQLExecute) on CubeSQL, MySQL, PostgreSQL or MSSQL, etc.In Aloe Express, reverse the Base64, decryption and compression into SQL Prepared statement.Place Base64 into URLConnection and SendSync to Aloe Express (or other).Compress and encrypt the JSON as Base64.build a Dictionary of the the SQL command components ie SQLCommand (‘SELECT * FROM XXXX’, ‘INSERT INTO XXX’, UPDATE XXXX SET’ or ‘DELETE FROM XXXX’), the optional WHERECommand (‘id = 100’), the optional ORDERBYCommand (‘FirstName’), the optional GROUPBYCommand (‘LastName’), the optional LIMITNumber (100), three optional and matching arrays for either inserting or Prepared Statements (FieldNames() as String, FieldTypes() as String and FieldValues() as Variant).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |