async getBookmarkInfo (id, onlyName = false, page = 1, size = 20) {
    const bookmarkName = await db('bookmarks').where('id', id).select('*').first()
    if (onlyName) {
      return {
        id: bookmarkName.id,
        name: bookmarkName.name
      }
    }
    let metadatas = await db('bookmarks_mapping').where('bookmarkId', id).orderBy('id', 'desc').select('*').paginate({
      perPage: size,
      currentPage: page
    })

    const processed = []
    metadatas = metadatas.data
    for (const i in metadatas) {
      const item = metadatas[i]
      processed.push(await metadata.getMetadataById(item.metadataId))
    }

    let total = await db('bookmarks_mapping').where('bookmarkId', id).count()
    total = total[0]['count(*)']

    return {
      total,
      name: bookmarkName.name,
      metadatas: processed
    }
  }
Get bookmark info by id

@param {Int} id bookmark id
@param {Boolean} onlyName only name

@returns {Array} matedata id