Skip to content

Commit

Permalink
pub: v1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Saeid Ostad committed May 12, 2021
1 parent 4bb746d commit 3269164
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/interfaces/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h3><span class="tsd-flag ts-flagOptional">Optional</span> create<wbr>Index<wbr>
<div class="tsd-signature tsd-kind-icon">create<wbr>Index<wbr>File<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/saostad/sql-ts-knex-generator/blob/d3b3b6c/src/index.ts#L10">src/index.ts:10</a></li>
<li>Defined in <a href="https://github.com/saostad/sql-ts-knex-generator/blob/4bb746d/src/index.ts#L10">src/index.ts:10</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sql-ts-knex-generator",
"version": "1.8.0-beta05",
"version": "1.8.0",
"main": "./dist/index.js",
"description": "A simple command line tool to generate typescript CRUD operations from database schemas.",
"bin": "./bin/sql-ts-knex-generator",
Expand Down
6 changes: 3 additions & 3 deletions templates/interfaces-and-functions.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ interface AddFnInput {
client: Knex;
data: {{interfaceName}}Input;
}
export async function add{{name}} ( {client, data}: AddFnInput){
export async function add{{name}}( {client, data}: AddFnInput){
return client<{{interfaceName}}>("{{name}}")
.insert(data)
.returning([
Expand All @@ -104,7 +104,7 @@ interface DeleteFnInput {
where?: Partial<{{interfaceName}}>;
whereRaw?: string;
}
export async function delete{{name}} ( {client, where, whereRaw}: DeleteFnInput){
export async function delete{{name}}( {client, where, whereRaw}: DeleteFnInput){
const query = client<{{interfaceName}}>("{{name}}")

if(where){
Expand All @@ -124,7 +124,7 @@ interface UpdateFnInput {
where?: Partial<{{interfaceName}}>;
whereRaw?: string;
}
export async function update{{name}} ({client, data, where, whereRaw}: UpdateFnInput) {
export async function update{{name}}({client, data, where, whereRaw}: UpdateFnInput) {
const query = client<{{interfaceName}}>("{{name}}");

if(where){
Expand Down

0 comments on commit 3269164

Please sign in to comment.