 
 
 scraperwiki.dataset.sql.meta = (success, error) ->
-  # get info about the main dataset's SQL database.
-  # [success] and [error] callbacks are optional,
-  # since this returns a jQuery deferred object on which
-  # you can chain .done() and .fail() handlers.
+  ###
+  Get info about the main dataset's SQL database.
+  [success] and [error] callbacks are optional,
+  since this returns a jQuery deferred object on which
+  you can chain .done() and .fail() handlers.
+  ###
   settings = scraperwiki.readSettings()
   boxSettings = settings.target ? settings.source
   options =



scraperwiki.dataset.installTool = (toolName, query) ->
  # installs the specified tool into the current dataset,
  # passing it the optional [query] in scraperwiki.readSettings().sqlQuery
  parent.scraperwiki.xdm.pushSQL(query, toolName)


scraperwiki.tool.name = (arg) ->
  # [arg] should either be a string (to set the tool's name),
  # a function (to get the tool's current name, and pass it 
  # to the callback function),
  # or undefined, in which case we get the tool's current name
  # and pass it to a jQuery deferred object.
  if typeof(arg) is 'string'
    # we can't currently rename a tool; only a dataset!!
    # parent.scraperwiki.xdm.rename(scraperwiki.box, arg)



scraperwiki.tool.sql.meta = (success, error) ->
  ###
  Get info about this tool's internal SQL database.
  [success] and [error] callbacks are optional,
  since this returns a jQuery deferred object on which
  you can chain .done() and .fail() handlers.
  ###
  settings = scraperwiki.readSettings()
  options =
    url: "#{settings.source.url}/sql/meta"
