leizongmin/leizm-sql

增加 `.prefix(xxx)` 以支持表前缀

Open

#10 opened on Apr 26, 2019

 (0 comments) (0 reactions) (0 assignees)TypeScript (3 forks)github user discovery
help wanted

Repository metrics

Stars
 (5 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

import { prefix } from "@leizm/sql";
const { table } = prefix("my_");

table("user").select().where({ id: 1 }).limit(1).build();
// SELECT * FROM `my_user` WHERE `id`=1 LIMIT 1

Contributor guide