lib/relaxdb/view_uploader.rb
# Methods must start and finish on different lines
# The function declaration must start at the beginning of a line
# As '-' is used as a delimiter, the view name may not contain '-'
# Expected function declaration form is 
#   function funcname-functype(doc) {
# For example 
#   function Users_followers-map(doc) {
#
# Builtin Erlang views may be specified by listing a one-line function
# that contains only the builtin name. For example:
#  function Users_followers-reduce() {
#    _sum
#  }
#
Methods must start and finish on different lines
The function declaration must start at the beginning of a line
As '-' is used as a delimiter, the view name may not contain '-'
Expected function declaration form is
function funcname-functype(doc) {
For example
function Users_followers-map(doc) {

Builtin Erlang views may be specified by listing a one-line function
that contains only the builtin name. For example:
function Users_followers-reduce() {
_sum
}
Methods must start and finish on different lines The function declaration must start at the beginning of a line As ' - ' is used as a delimiter the view name may not contain ' - ' Expected function declaration form is function funcname - functype ( doc ) { For example function Users_followers - map ( doc ) { Builtin Erlang views may be specified by listing a one - line function that contains only the builtin name . For example : function Users_followers - reduce () { _sum }
def upload(filename)
        lines = File.readlines(filename)
        dd = RelaxDB::DesignDocument.get(RelaxDB.dd)
        extract(lines) do |vn, t, f|
          dd.add_view(vn, t, f)
        end
        dd.save
      end
def upload ( filename ) lines = File . readlines ( filename ) dd = RelaxDB :: DesignDocument . get ( RelaxDB . dd ) extract ( lines ) do | vn , t , f | dd . add_view ( vn , t , f ) end dd . save end
Methods must start and finish on different lines
The function declaration must start at the beginning of a line
As '-' is used as a delimiter, the view name may not contain '-'
Expected function declaration form is
function funcname-functype(doc) {
For example
function Users_followers-map(doc) {
Methods must start and finish on different lines The function declaration must start at the beginning of a line As ' - ' is used as a delimiter the view name may not contain ' - ' Expected function declaration form is function funcname - functype ( doc ) { For example function Users_followers - map ( doc ) {
filename
<not_specific>