Commit Graph

182 Commits

Author SHA1 Message Date
David Glasser
9154b5d3c4 C.find(q, {reactive: false}).observe() should only produce initial adds.
Fixes #771.
2013-03-04 22:19:11 -08:00
David Glasser
26430d117b Review of PR #716 (multi-cursor publish).
- History.md update

- tweak docs

- refactor the "one per collection" check

- make errors into internal errors.  Programming errors like returning the wrong
  type from a function on the server don't need to be reported to the client.
2013-03-04 18:30:38 -08:00
k.kurilov
3fb2434d71 Return multiple cursors from publish function. 2013-03-04 18:09:44 -08:00
David Greenspan
12a123c466 docs link fixes from check_links() 2013-03-04 14:08:44 -08:00
David Glasser
307172885a Updates to minimongo docs, since we've implemented some things now. 2013-02-28 13:19:58 -08:00
Naomi Seyfer
dba23bd29c Session.setDefault, and updating todos to use it. #698 2013-02-20 17:56:39 -08:00
Naomi Seyfer
a920d568ec Added an E to the JSON where we support it, in the docs 2013-02-20 16:33:27 -08:00
Naomi Seyfer
036c471b2d Fixed #690: inconsistant use of fields in api docs
Also messed with spacing so that the end of a sentence could be less
easily confused with the dot operator in a particular place.
2013-02-20 15:32:17 -08:00
Naomi Seyfer
c911cd9ef4 Greenspan comments on ddp-pre1 diff 2013-02-20 14:52:28 -08:00
Matt DeBergalis
f3c3d5cc29 observeChanges calls addedBefore, not addedAt 2013-02-19 17:41:56 -08:00
David Glasser
e1b07e4848 Merge branch 'devel' into ddp-pre1 2013-02-13 17:05:07 -08:00
David Glasser
806ffc6b60 Updates to ObjectID docs. 2013-02-13 14:46:27 -08:00
David Glasser
9a7ac87778 Document random package. 2013-02-13 00:42:05 -08:00
David
dc9f69d39f Minor link correction 2013-02-12 18:16:02 -08:00
David Glasser
db535c93f3 Improved docs for two Meteor.subscribe changes.
(onError and handle.ready())
2013-02-11 20:11:05 -08:00
David Glasser
db917f4741 DDP server: Implement sub.error() and reimplement sub.stop().
Note that sub.stop() is now handled by the client (it removes the record of the
subscription) but there is no way for an app to observe this. (I expect we'll
use sub.stop() in implementing "fetch" in the Mongo connector.)
2013-02-07 15:43:28 -08:00
Geoff Schmidt
9b3cd467d0 Second draft of observe/observeChange docs 2013-02-07 15:41:20 -08:00
Geoff Schmidt
557dd363f4 markdown is mia 2013-02-07 14:52:18 -08:00
Naomi Seyfer
515b04f13c Example publish now uses observeChanges 2013-02-06 18:39:57 -08:00
Naomi Seyfer
c6f72b612f Draft docs for new observe 2013-02-06 18:37:33 -08:00
David Glasser
3f2aad7c0e Rename subscription "complete" to "ready" everywhere (including in the
protocol and the publisher API).

Also update examples/other/quiescence for ddp-pre1.
2013-01-30 13:34:58 -08:00
David Glasser
62e83ec2bc When a connection fails permanently due to version number skew, show it in the
reactive status object and don't try to reconnect.

Note that this only happens if the server rejects the connection due to an
unfixable version mismatch: if the server is unreachable or not speaking
versioned DDP, the client will continue to retry.
2013-01-29 22:36:13 -08:00
Naomi Seyfer
deb06b627e Workshopping docs for EJSON and ObjectID w/ nim 2013-01-17 15:56:13 -05:00
Naomi Seyfer
20145a7f42 Docs for EJSON package 2013-01-17 15:56:13 -05:00
Naomi Seyfer
c99c816331 Fixing up docs, making ObjectID consistent with Node api 2013-01-17 15:51:56 -05:00
Naomi Seyfer
5b4910c965 First draft of docs for types. 2013-01-17 15:49:52 -05:00
Naomi Seyfer
91b1f3b15c Workshopping words on the publish docs 2013-01-17 15:25:01 -05:00
Naomi Seyfer
daa559366c Modified docs to reflect ddp-pre1 and new publish handler api 2013-01-17 15:24:28 -05:00
David Glasser
27d3073660 Make Meteor.autosubscribe a deprecated alias for Meteor.autorun.
Instead of a general client-side sub de-duping mechanism (which mostly existed
for the sake of autosubscribe, and causes issues with server-driven
unsubscribes), make Meteor.subscribe explicitly aware of reactivity.

Expose an "invalidated" flag on Meteor.deps.Context.

Guarantee that invalidation callbacks from different contexts will not be
interleaved at flush time. This has the implication that if you do

   context1.onInvalidate(function () {
     context2.invalidate();
   });

and this is the only way to invalidate context2, then context2's invalidation
callbacks will not be called until after *ALL* of context1's callbacks are
called. This allows us to be sure that the "unsubscribe, unless autorun tried to
re-create an identical sub" logic runs after the autorun function is rerun.
2013-01-15 17:07:03 -05:00
David Glasser
47d5abb7d8 Remove some no-longer-true caveats about Minimongo from docs. 2012-12-24 11:31:33 -08:00
Naomi Seyfer
06a3e23730 The rest of the docs for Meteor.settings 2012-12-12 12:53:39 -08:00
Geoff Schmidt
da4699288d tweaks to Email.send example 2012-12-12 12:17:53 -08:00
Evan
e2743eeab0 Update docs/client/api.html
Added example to Email.send
2012-12-12 12:05:52 -08:00
Avital Oliver
240d6e64f7 Improve offline google oauth token support:
- Use an argument to Meteor.loginWithGoogle and Accounts.ui.config
  rather than a UI-powered configuration option
- Add documentation
- Some cleanup
2012-12-03 22:10:43 -08:00
David Glasser
3a3126568a docs: clarify that the 'fields' option to find/findOne is server-only
and the 'reactive' option is client-only.

Avoid using the term Minimongo to mean "client-only".

Fixes #492.
2012-11-28 13:27:20 -08:00
David Glasser
f8c54c4046 Overhaul quiescence, method callback timing, and login methods on the client.
- Data streamed from the server is quiesced on a per-object basis, not a global
  basis. We track which documents a method stubs modifies, and create individual
  snapshots ("server documents") of those documents rather than whole-Collection
  snapshots. Data writes from the server to documents not modified by stubs are
  applied immediately to the local cache; other writes are applied to the
  "server document" snapshots. Server documents are flushed to the local cache
  when all method stubs that wrote to the document have sent their "data write"
  message.  (We still do "full database" quiescence after a reconnect.)

- Instead of calling method callbacks as soon as the result is received, we wait
  until all data that precedes their "data done" message is flushed to the local
  cache. This way, method callbacks can see all of their results locally. (This
  applies to Collection mutator callbacks as well.) If this delay is
  unacceptable, you can also specify the onResultReceived option to
  Meteor.apply; this callback is given the method result as soon as it comes in,
  and there's no guarantee that the local cache is up to date.
  (This is a client-only change: server-side callbacks do not block on the
  write fence.)

- Methods invoked with the "wait" option to Meteor.apply now wait until all
  preceding methods are fully finished to be *sent*, not just to call their
  callbacks. ie, previous calls block the "wait" method in the same way that
  "wait" methods block subsequent calls.

- Remove Meteor.userLoaded and {{currentUserLoaded}}.
  Meteor.userId() is now set only at the point where Meteor.user() is fully
      loaded.
  Current user data is published via an unnamed subscription, not via
      "meteor.currentUser".
  Replace them with Meteor.loggingIn() and {{loggingIn}}, which become true
      as soon as the login method is sent (instead of only once it succeeds).
  In accounts-ui, move the spinny into the dropdown, because it now shows up
      before error messages would.

- Previously, if we received the "result" message from a method but no "data"
  message, and then disconnected and reconnected, quiescence would be
  permanently blocked. Now, not only do we allow the app to continue working,
  but we even guarantee that the method's callback will be called at the
  "reconnect quiescence" point.

- Remove reset function from the Store API (the interface between
      _LivedataConnection and Collection), and add a boolean "reset" argument to
      beginUpdate instead.
  Add saveOriginals/retrieveOriginals functions to the Store API (pass-through
      to minimongo implementation).
  Allow "replace" messages to be passed to the Store API's update function
      (in addition to set/unset).
  Allow Store API implementations (eg tinytest_client) to not specify all
      functions.

- Server-side tinytest results now stream into the result page instead of
  appearing all at once at the end.

- Rename fields and methods of Meteor._LivedataConnection as camelCase, and
  prepend all internal fields with _.

- Different Meteor._LivedataConnection objects now have separate
  _userIdListeners _ContextSets.

- Remove snapshot/restore functionality from Minimongo collections. (Individual
  queries still have result snapshots.) The "server documents" in
  Meteor._LivedataConnection serve the equivalent purpose.

- Meteor.loginWithToken's callback is now a "call with error on error, call
  with no args on success" callback like the other login callbacks.

- The test-only Meteor._LivedataConnection.onQuiesce function is removed.
  Every single use of it is now supported by normal method callbacks.
2012-11-14 18:10:08 -08:00
Avital Oliver
ea3afdb35a Minor docs improvement around login service configuration 2012-11-14 13:41:57 -08:00
David Glasser
e4d237f59a docs: custom publish functions don't need to unset in onStop. 2012-11-05 19:01:58 -08:00
David Glasser
c8a9bc9e5a Fix doc argument type formatting (fixes #432) 2012-11-05 14:55:55 -08:00
David Glasser
7d8f744f15 Some tweaks to dandv's doc cleanups. 2012-11-05 11:36:47 -08:00
Dan Dascalescu
5ccacd1fbd Doc cleanups. Fixes #430. 2012-11-05 11:19:23 -08:00
Avital Oliver
953e509d8d Document {{currentUser}} and {{currentUserLoaded}} 2012-11-01 13:30:05 -07:00
David Glasser
dee48f736a Docs: In custom publish example, call complete(). 2012-10-29 11:56:14 -07:00
David Glasser
1c70dcef66 Fix a few typos in Meteor.uuid docs.
While we're at it, linkify RFC reference.
2012-10-23 10:57:05 -07:00
Geoff Schmidt
893e37f4d7 #387: Document Meteor.uuid. Thanks @dandv! 2012-10-20 00:56:42 -07:00
Nick Martin
6e15cc1562 Linkify references to minimongo that happen outside the collection section. Fixes #388.
Would be good to have a more built out minimongo section someday.
2012-10-18 19:57:53 -07:00
Dan Dascalescu
c084e35282 API docs typo and formatting fixes 2012-10-17 16:22:20 -07:00
David Glasser
bf656fb5d6 Document the createdAt field of users. 2012-10-16 10:03:39 -07:00
Nick Martin
2238b42fb9 Rework last few XXXs in accounts api. 2012-10-16 01:05:46 -07:00
David Glasser
9cc1caa8ca First shot at adding more information to external services doc. 2012-10-15 23:28:56 -07:00