INNER CODE UNIT · JavaScript

matches

furey/mongodb-lens · mongodb-lens.js:514

              const matches = fields.filter(field =>
                field.toLowerCase().includes(value.toLowerCase())
              )
              log(`Resource: Found ${matches.length} matching fields for collection '${params.name}'.`)
              return matches
            } catch (error) {
              log(`Error completing field names: ${error.message}`, true)
              return []
            }
          }
        }
      }),
      { description: 'Schema information for a MongoDB collection' },
      async (uri, { name }) => {
        log(`Resource: Inferring schema for collection '${name}'…`)
        const schema = await inferSchema(name)
        log(`Resource: Schema inference complete for '${name}', identified ${Object.keys(schema.fields).length} fields.`)
        return {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…