UNPKG
dobo-knex
Version:
latest (2.6.0)
2.6.0
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.1
2.4.0
2.3.0
2.2.1
2.2.0
2.0.1
2.0.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.7
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Knex/SQL driver for Dobo
github.com/ardhi/dobo-knex
ardhi/dobo-knex
dobo-knex
/
dobo
/
lib
/
manticore
/
model-exists.js
9 lines
(7 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
async
function
modelExists
(
schema
) {
const
{ getInfo } =
this
.
app
.
dobo
const
{ instance } =
getInfo
(schema)
const
tables =
await
instance.
client
.
raw
(
`show tables like '
${schema.name}
'`
)
return
tables[
0
].
length
>
0
}
export
default
modelExists