Reputation: 200
Is it possible to use custom database schema name with request.execute() method?
For all the cases with Azure mobile service till now, i've always used the DB schema name same as Mobile Service name. I've a case now where the DB schema name is different than mobile service name and was wondering if I can still use request.execute() method with some customization.
I know that i can always use mssql.query() to run custom queries but I was wondering if its possible to use custom schema name with "request" object in table scripts.
Upvotes: 2
Views: 210
Reputation: 10975
I do not believe this is possible. The request.execute method is only available on a table request (see MSDN Docs on request object under Mobile Services) as opposed to a Custom API call. The table object in mobile service is linked directly to one of the tables in the attached Azure SQL DB which utilizes the schema name of the mobile service. I don't think you can override this. As you point out you can use mssql to query or work against other tables within the same database, or even other databases.
On a side note the tables object is available, but also seems to be scoped to the same schema name and you can't get at tables from other schemas.
It might be possible that there is a way to get the default for the schema name to be something other than the mobile service name (not that I know of though), but as for a one off ability to tell request to use a different schema, not at this time.
Upvotes: 1