Skip to content

Commit

Permalink
support custom sql query definitiion
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazuki committed Sep 9, 2016
1 parent e6d4c9e commit 18dab80
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion azure-mobile-apps/azure-mobile-apps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,29 @@ declare namespace Azure.MobileApps {
item: any;
req: Express.Request;
res: Express.Response;
data: (table: TableDefinition) => Data.Table;
data: ContextData;
tables: (tableName: string) => Data.Table;
user: User;
push: typeof nh;
logger: Logger;
execute(): Thenable<any>;
}

interface ContextData {
(table: TableDefinition): Data.Table;
execute(q: SqlQueryDefinition): Thenable<any>;
}

interface SqlQueryDefinition {
sql: string;
parameters?: SqlParameterDefinition[];
}

interface SqlParameterDefinition {
name: string;
value: any;
}

interface TableDefinition {
authorize?: boolean;
autoIncrement?: boolean;
Expand Down

0 comments on commit 18dab80

Please sign in to comment.