Commit Graph

110 Commits

Author SHA1 Message Date
behackett
e0fcc9825f Fix a minor docstring issue. 2012-04-20 15:57:24 -07:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00
Bernie Hackett
ef803527bb Python 3 gridfs package changes PYTHON-84 2012-03-22 14:42:34 -07:00
behackett
a4ea04cb7f Guard against PHP-237 - PYTHON-290 2011-11-11 15:49:52 -08:00
behackett
4fa59c2fd8 Query GridFS from a secondary/slave PYTHON-263 2011-11-01 21:08:41 -07:00
Dan Crosta
59758053a0 avoid making extra queries when using get_[last_]version 2011-09-29 13:02:46 -07:00
behackett
5948ed94b5 Don't add a _closed field to files PYTHON-278
GridIn was adding a _closed field to each file
in the files collection. This seems incorrect and
adds another round trip to the server when closing
the file.
2011-08-31 14:40:09 -07:00
Alexey Borzenkov
7b0d289982 PYTHON-271: fix GridFS loss of data 2011-08-15 14:01:29 -07:00
Josip Delic
085a7e7d30 also use StringIO for writing strings in gridfs performance boost 2011-05-29 08:28:28 -07:00
Bernie Hackett
10b451a3cd close method and code/test cleanups PYTHON-209 2011-05-29 07:39:20 -07:00
Jonas Haag
09017cb53c Allow GridOut to be used in a with statement. (PYTHON-209) 2011-05-29 06:57:51 -07:00
behackett
a048cc63b2 Fix version numbers in a few comments. 2011-05-06 12:07:33 -07:00
Dan Crosta
23bf1bb2a5 always ensure_index, it has minimal overhead 2011-04-28 12:03:54 -07:00
Dan Crosta
ae189fa7dd ensure_index when querying by filename only 2011-04-28 12:03:54 -07:00
Dan Crosta
96c66f5269 whoops, meant 1.10.1+ 2011-04-28 12:03:54 -07:00
Dan Crosta
b95dfcdaa1 use versionchanged for default value of filename 2011-04-28 12:03:54 -07:00
Dan Crosta
10e6cfea50 no need to copy the kwargs dict 2011-04-28 12:03:54 -07:00
Dan Crosta
80f7fa7f79 be consistent with how we limit fields in other methods 2011-04-28 12:03:54 -07:00
Dan Crosta
2683affc4d clean up docstrings per behackett's comments 2011-04-28 12:03:54 -07:00
Dan Crosta
afeda6df59 allow querying by metadata in GridFS.get_[last_]version() 2011-04-28 12:03:54 -07:00
Dan Crosta
b4665592ec only return _id when querying from GridFS.get_version() 2011-04-28 12:03:54 -07:00
Dan Crosta
8df44533e6 correct a typo in GridOut.__getattr__ 2011-04-26 14:31:14 -07:00
Mathias Stearn
066be855b9 more documentation PYTHON-168 2010-10-21 17:29:22 -04:00
Mike Dirolf
4087168bcb minor: spacing 2010-09-29 11:45:28 -04:00
Mike Dirolf
1992b6cd29 BUMP 1.9 2010-09-28 10:48:46 -04:00
Mike Dirolf
7cde8c744f outdated todo 2010-09-23 14:48:57 -04:00
Mike Dirolf
9c182809f3 Create a separate bson package PYTHON-60
Many of the pymongo modules have been moved into the bson
package. Aliases for those modules have been added to the pymongo
package, without deprecation warnings for now. Application developers
should begin to use the bson namespace, as deprecation of moved
modules will probably begin in the next release.
2010-09-14 13:52:50 -04:00
Mike Dirolf
64f9641609 allow updating (some) file metadata after a GridIn has been closed PYTHON-116 2010-09-07 15:43:38 -04:00
Mike Dirolf
68a6be85c5 slight cleanup and add Christian to contributors list 2010-09-03 12:17:38 -04:00
Christian Wyglendowski
fee7ff8a75 Performance improvements for reading from GridFS.
Switched to join()ing strings instead of concatenating them. The time
spent in GridOut.read() is now less than 1% of what it was before. All
tests pass.

Before:
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.001    0.001 grid_file.py:316(__init__)
        1    1.362    1.362    1.901    1.901 grid_file.py:375(read)
       32    0.000    0.000    0.000    0.000 grid_file.py:54(getter)

After:
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
        1    0.000    0.000    0.001    0.001 grid_file.py:316(__init__)
        1    0.005    0.005    0.567    0.567 grid_file.py:375(read)
       32    0.000    0.000    0.000    0.000 grid_file.py:54(getter)
2010-09-04 00:06:17 +08:00
Mike Dirolf
f157a35377 allow writing unicode to GridFS if an encoding attribute has been specified PYTHON-100 2010-08-31 12:25:45 -04:00
Mike Dirolf
9ddabb9b0b add gridfs get_version method PYTHON-115 2010-08-30 16:26:09 -04:00
Mike Dirolf
8098845c0e add readline to GridOut PYTHON-157 2010-08-20 11:26:36 -04:00
Mike Dirolf
b4fe7faefc only need _id for exists 2010-08-17 16:55:06 -04:00
Mike Dirolf
1cfa801f02 add file_document param to GridOut to initialize from existing file doc PYTHON-117 2010-08-16 17:09:45 -04:00
Mike Dirolf
a3a8cf2d79 BUMP 1.8 - see changelog for details 2010-08-05 10:04:37 -04:00
Mike Dirolf
a264d75483 towards pep8 2010-07-22 11:38:22 -04:00
Mike Dirolf
dc44f54a53 exists indexing note 2010-06-22 16:19:44 -04:00
Mike Dirolf
169ec824dc add GridFS.exists method PYTHON-132 2010-06-22 10:51:04 -04:00
Mike Dirolf
2bb4d67c12 BUMP 1.7 - see changelog for details 2010-06-17 12:46:33 -04:00
Mike Dirolf
790f87be4a actually, keep using subtype 2 as default for a while 2010-06-17 11:37:19 -04:00
Mike Dirolf
101cd109da continue to use subtype 2 for GridFS, since filemd5 was only updated to handle other subtypes in 1.5.x 2010-06-16 14:39:13 -04:00
Mike Dirolf
280a38681c more aggressive about index creation w/ gridfs 2010-06-01 15:53:23 -04:00
Mike Dirolf
ca95b49e0e save file document in safe mode for GridFS, so we can raise an exception on duplicates 2010-05-11 10:22:16 -04:00
Mike Dirolf
b700ba2b0f use filename for attribute, don't map from name to filename transparently 2010-04-15 15:11:50 -04:00
Mike Dirolf
f2029b175c BUMP 1.6 -- see changelog for details 2010-04-14 17:14:34 -04:00
Mike Dirolf
ef37e52067 move metadata to file object itself 2010-04-05 10:49:05 -04:00
Mike Dirolf
bec638f6f5 make GridOut an iterator returning chunk sized strings 2010-04-02 10:37:37 -04:00
Mike Dirolf
f25af4d7ee minor: 1.5.1+ -> 1.5.2+ 2010-03-31 11:42:00 -04:00
Mike Dirolf
13d2185869 raise NoFile on non-existant filename 2010-03-30 10:20:10 -04:00