Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
L
lua-Spore
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • François Perrad
  • lua-Spore
  • Issues
  • #16

Closed
Open
Opened Feb 10, 2014 by François Perrad@fperrad
  • Report abuse
  • New issue
Report abuse New issue

cannot create database with '/' in name

Created by: squirrelpiles

per CouchDB docs, database names can contain a forward slash '/'. I am trying to do this using lua-Spore, but cannot get it to work.

I want to be able to create names like: aaa/bbb/ccc

thank you. - dave

Here is code I am testing with:

local base = 'https://raw.github.com/SPORE/api-description/master/apps/couchdb/' local couchdb = require 'Spore'.new_from_spec( base .. 'server.json', base .. 'database.json', base .. 'document.json', base .. 'design.json', { base_url = 'http://127.0.0.1:5984/' }) couchdb:enable_if(function (req) return req.env.spore.caller ~= 'get_attachment' end, 'Format.JSON')

-- from https://wiki.apache.org/couchdb/HTTP_database_API

-- All database files are stored in a single directory on the file system. If your database -- includes a / CouchDB will create a sub-directory structure in the database directory. That -- is, a database named his/her, the database file will be available at $dbdir/his/her.couch. -- This is useful when you have a large number of databases and your file system does not like that.

-- this works: curl -X PUT http://localhost:5984/foo%2Fjnk

-- this doesn't: local r = couchdb:create_db{ db = 'foo/jnk' }

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: fperrad/lua-Spore#16