Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Usage w/o DB connection #338

@matyunin

Description

@matyunin

Hello! How can i use Knex only for query building as a string? Without specifying connection to DB.

i.e.

var knex = require('knex')({
  dialect: 'mysql'
});

knex.select('title', 'author', 'year').from('books')

Outputs:

select `title`, `author`, `year` from `books`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions